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

This commit is contained in:
あく 2023-08-26 02:00:00 +09:00 committed by GitHub
parent 66d26c16cd
commit cf74dd2599
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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