Rfid: fix crash on broken key launch from archive (#3012)

This commit is contained in:
あく
2023-08-25 21:00:00 +04:00
committed by GitHub
parent 66d26c16cd
commit cf74dd2599
+8 -6
View File
@@ -186,13 +186,15 @@ int32_t lfrfid_app(void* p) {
dolphin_deed(DolphinDeedRfidEmulate); dolphin_deed(DolphinDeedRfidEmulate);
} else { } else {
furi_string_set(app->file_path, args); furi_string_set(app->file_path, args);
lfrfid_load_key_data(app, app->file_path, true); if(lfrfid_load_key_data(app, app->file_path, true)) {
view_dispatcher_attach_to_gui( view_dispatcher_attach_to_gui(
app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen); app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate); scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate);
dolphin_deed(DolphinDeedRfidEmulate); dolphin_deed(DolphinDeedRfidEmulate);
} else {
view_dispatcher_stop(app->view_dispatcher);
}
} }
} else { } else {
view_dispatcher_attach_to_gui( view_dispatcher_attach_to_gui(
app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen); app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);