From 2f7dfe434b3112265fb58e4cc5d7422e593686ba Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Thu, 21 Mar 2024 04:42:01 +0000 Subject: [PATCH] App crash bugfixes - BLE Spam: Fix icon position - Hex Viewer: Fix view alloc/free - Chess: Fix view alloc/free - UHF RFID: Fix view alloc/free --- applications/external | 2 +- applications/system/hex_viewer/hex_viewer.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/applications/external b/applications/external index d8dcb90bd..676d035fb 160000 --- a/applications/external +++ b/applications/external @@ -1 +1 @@ -Subproject commit d8dcb90bda586b11e9206289c3d94419e508c732 +Subproject commit 676d035fb6c8af494d6a12570f60eede7e04f7d5 diff --git a/applications/system/hex_viewer/hex_viewer.c b/applications/system/hex_viewer/hex_viewer.c index 96b0c5fe1..916ed9f7c 100644 --- a/applications/system/hex_viewer/hex_viewer.c +++ b/applications/system/hex_viewer/hex_viewer.c @@ -45,9 +45,6 @@ HexViewer* hex_viewer_app_alloc() { view_dispatcher_set_custom_event_callback( app->view_dispatcher, hex_viewer_custom_event_callback); - app->submenu = submenu_alloc(); - app->text_input = text_input_alloc(); - // Set defaults, in case no config loaded app->haptic = 1; app->speaker = 1; @@ -61,6 +58,7 @@ HexViewer* hex_viewer_app_alloc() { // Load configs hex_viewer_read_settings(app); + app->submenu = submenu_alloc(); view_dispatcher_add_view( app->view_dispatcher, HexViewerViewIdMenu, submenu_get_view(app->submenu)); @@ -70,6 +68,7 @@ HexViewer* hex_viewer_app_alloc() { HexViewerViewIdStartscreen, hex_viewer_startscreen_get_view(app->hex_viewer_startscreen)); + app->text_input = text_input_alloc(); view_dispatcher_add_view( app->view_dispatcher, HexViewerViewIdScroll, text_input_get_view(app->text_input)); @@ -97,11 +96,13 @@ void hex_viewer_app_free(HexViewer* app) { // View Dispatcher view_dispatcher_remove_view(app->view_dispatcher, HexViewerViewIdMenu); - view_dispatcher_remove_view(app->view_dispatcher, HexViewerViewIdScroll); - view_dispatcher_remove_view(app->view_dispatcher, HexViewerViewIdSettings); - submenu_free(app->submenu); + view_dispatcher_remove_view(app->view_dispatcher, HexViewerViewIdStartscreen); + hex_viewer_startscreen_free(app->hex_viewer_startscreen); + view_dispatcher_remove_view(app->view_dispatcher, HexViewerViewIdScroll); text_input_free(app->text_input); + view_dispatcher_remove_view(app->view_dispatcher, HexViewerViewIdSettings); + variable_item_list_free(app->variable_item_list); view_dispatcher_free(app->view_dispatcher); furi_record_close(RECORD_STORAGE);