From 9868a65c15dfe2b152cde67d792d2de5264452bd Mon Sep 17 00:00:00 2001 From: Georgii Surkov <37121527+gsurkov@users.noreply.github.com> Date: Wed, 22 Jun 2022 18:05:17 +0300 Subject: [PATCH] [FL-2602] Infrared: Fix crash when messing with SD card (#1339) * Fix crash after removing SD card and exiting * Show an error if SD card was removed on Universal remote screen --- applications/infrared/infrared_brute_force.c | 1 + .../infrared/scenes/common/infrared_scene_universal_common.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/infrared/infrared_brute_force.c b/applications/infrared/infrared_brute_force.c index 872a7637..55bf5c7f 100644 --- a/applications/infrared/infrared_brute_force.c +++ b/applications/infrared/infrared_brute_force.c @@ -99,6 +99,7 @@ bool infrared_brute_force_start( success = flipper_format_file_open_existing(brute_force->ff, brute_force->db_filename); if(!success) { flipper_format_free(brute_force->ff); + brute_force->ff = NULL; furi_record_close("storage"); } } diff --git a/applications/infrared/scenes/common/infrared_scene_universal_common.c b/applications/infrared/scenes/common/infrared_scene_universal_common.c index f0e69030..7eff81ee 100644 --- a/applications/infrared/scenes/common/infrared_scene_universal_common.c +++ b/applications/infrared/scenes/common/infrared_scene_universal_common.c @@ -74,7 +74,7 @@ bool infrared_scene_universal_common_on_event(void* context, SceneManagerEvent e infrared_play_notification_message( infrared, InfraredNotificationMessageBlinkSend); } else { - scene_manager_previous_scene(scene_manager); + scene_manager_next_scene(scene_manager, InfraredSceneErrorDatabases); } consumed = true; }