Skip to content

Commit

Permalink
Merge pull request #103 from jamisonderek/dev
Browse files Browse the repository at this point in the history
JS: Fix widget sometimes MemCrash on exit.
  • Loading branch information
Willy-JL authored Apr 20, 2024
2 parents e3cc377 + 17646ca commit f2a6ad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions applications/system/js_app/modules/js_widget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f2a6ad6

Please sign in to comment.