From ec7676182aeee82f054c31cb94a5491cfb7f54b1 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Fri, 16 Sep 2022 02:15:58 +0300 Subject: [PATCH] fix null pointer dereference --- applications/main/archive/archive.c | 3 ++- applications/main/archive/archive_i.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/main/archive/archive.c b/applications/main/archive/archive.c index 2ac2bf0f6..a2eee5937 100644 --- a/applications/main/archive/archive.c +++ b/applications/main/archive/archive.c @@ -64,7 +64,6 @@ void archive_free(ArchiveApp* archive) { ViewDispatcher* view_dispatcher = archive->view_dispatcher; // Loading - view_dispatcher_remove_view(view_dispatcher, ArchiveViewLoading); loading_free(archive->loading); view_dispatcher_remove_view(view_dispatcher, ArchiveViewTextInput); @@ -75,6 +74,8 @@ void archive_free(ArchiveApp* archive) { view_dispatcher_remove_view(view_dispatcher, ArchiveViewBrowser); + view_stack_free(archive->view_stack); + view_dispatcher_free(archive->view_dispatcher); scene_manager_free(archive->scene_manager); diff --git a/applications/main/archive/archive_i.h b/applications/main/archive/archive_i.h index 0c5b337e6..7f4ff5a7b 100644 --- a/applications/main/archive/archive_i.h +++ b/applications/main/archive/archive_i.h @@ -21,7 +21,6 @@ typedef enum { ArchiveViewTextInput, ArchiveViewWidget, ArchiveViewTotal, - ArchiveViewLoading, ArchiveViewStack, } ArchiveViewEnum;