[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
This commit is contained in:
Georgii Surkov 2022-06-22 18:05:17 +03:00 committed by GitHub
parent 556af0b82b
commit 9868a65c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -99,6 +99,7 @@ bool infrared_brute_force_start(
success = flipper_format_file_open_existing(brute_force->ff, brute_force->db_filename); success = flipper_format_file_open_existing(brute_force->ff, brute_force->db_filename);
if(!success) { if(!success) {
flipper_format_free(brute_force->ff); flipper_format_free(brute_force->ff);
brute_force->ff = NULL;
furi_record_close("storage"); furi_record_close("storage");
} }
} }

View File

@ -74,7 +74,7 @@ bool infrared_scene_universal_common_on_event(void* context, SceneManagerEvent e
infrared_play_notification_message( infrared_play_notification_message(
infrared, InfraredNotificationMessageBlinkSend); infrared, InfraredNotificationMessageBlinkSend);
} else { } else {
scene_manager_previous_scene(scene_manager); scene_manager_next_scene(scene_manager, InfraredSceneErrorDatabases);
} }
consumed = true; consumed = true;
} }