Merge pull request #103 from jamisonderek/dev

JS: Fix widget sometimes MemCrash on exit.
This commit is contained in:
WillyJL
2024-04-20 01:01:24 +01:00
committed by GitHub
@@ -917,9 +917,8 @@ static void widget_remove_view(void* context) {
ComponentArray_it(it, model->component);
while(!ComponentArray_end_p(it)) {
WidgetComponent* component = *ComponentArray_ref(it);
if(component->free) {
if(component && component->free) {
component->free(component);
component->free = NULL;
}
ComponentArray_next(it);
}
@@ -1003,6 +1002,7 @@ static void js_widget_destroy(void* inst) {
view_dispatcher_stop(widget->view_dispatcher);
widget_deinit(widget);
}
widget_remove_view(widget);
free(widget);
}