From de4b086083b8f9914631969c236505ac8c83ee5d Mon Sep 17 00:00:00 2001 From: WillyJL <49810075+Willy-JL@users.noreply.github.com> Date: Sat, 18 May 2024 19:40:01 +0100 Subject: [PATCH] Fix calling both `view_free_model()` and `view_free()` (#3655) --- applications/services/gui/view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/services/gui/view.c b/applications/services/gui/view.c index 8fc5c2699..a35c2fa38 100644 --- a/applications/services/gui/view.c +++ b/applications/services/gui/view.c @@ -97,10 +97,11 @@ void view_free_model(View* view) { furi_mutex_free(model->mutex); free(model->data); free(model); - view->model = NULL; } else { furi_crash(); } + view->model = NULL; + view->model_type = ViewModelTypeNone; } void* view_get_model(View* view) {