Skip to content

Commit

Permalink
Rfid: fix crash on broken key launch from archive (#3012)
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes authored Aug 25, 2023
1 parent 66d26c1 commit cf74dd2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions applications/main/lfrfid/lfrfid.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ int32_t lfrfid_app(void* p) {
dolphin_deed(DolphinDeedRfidEmulate);
} else {
furi_string_set(app->file_path, args);
lfrfid_load_key_data(app, app->file_path, true);
view_dispatcher_attach_to_gui(
app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate);
dolphin_deed(DolphinDeedRfidEmulate);
if(lfrfid_load_key_data(app, app->file_path, true)) {
view_dispatcher_attach_to_gui(
app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate);
dolphin_deed(DolphinDeedRfidEmulate);
} else {
view_dispatcher_stop(app->view_dispatcher);
}
}

} else {
view_dispatcher_attach_to_gui(
app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
Expand Down

0 comments on commit cf74dd2

Please sign in to comment.