Skip to content

Commit

Permalink
App crash bugfixes
Browse files Browse the repository at this point in the history
- BLE Spam: Fix icon position
- Hex Viewer: Fix view alloc/free
- Chess: Fix view alloc/free
- UHF RFID: Fix view alloc/free
  • Loading branch information
Willy-JL committed Mar 21, 2024
1 parent 8b69bae commit 2f7dfe4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion applications/external
13 changes: 7 additions & 6 deletions applications/system/hex_viewer/hex_viewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));

Expand All @@ -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));

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2f7dfe4

Please sign in to comment.