mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-08 09:09:46 +00:00
cellSaveData: avoid nullptr if there is no dialog
This commit is contained in:
parent
bf11a28fb5
commit
d73f04da13
1 changed files with 6 additions and 3 deletions
|
@ -168,7 +168,10 @@ static error_code select_and_delete(ppu_thread& ppu)
|
||||||
lv2_obj::sleep(ppu);
|
lv2_obj::sleep(ppu);
|
||||||
|
|
||||||
// Display Save Data List asynchronously in the GUI thread.
|
// Display Save Data List asynchronously in the GUI thread.
|
||||||
selected = Emu.GetCallbacks().get_save_dialog()->ShowSaveDataList(save_entries, focused, SAVEDATA_OP_LIST_DELETE, vm::null);
|
if (auto save_dialog = Emu.GetCallbacks().get_save_dialog())
|
||||||
|
{
|
||||||
|
selected = save_dialog->ShowSaveDataList(save_entries, focused, SAVEDATA_OP_LIST_DELETE, vm::null);
|
||||||
|
}
|
||||||
|
|
||||||
// Reschedule
|
// Reschedule
|
||||||
if (ppu.check_state())
|
if (ppu.check_state())
|
||||||
|
@ -176,8 +179,8 @@ static error_code select_and_delete(ppu_thread& ppu)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Abort if dialog was canceled
|
// Abort if dialog was canceled or selection is invalid in this context
|
||||||
if (selected == -2)
|
if (selected < 0)
|
||||||
{
|
{
|
||||||
return CELL_CANCEL;
|
return CELL_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue