mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
Fix segfault on missing firmware
Wait until kill to close the gs_frame on error
This commit is contained in:
parent
664e09f1ff
commit
0ef2e96121
@ -987,21 +987,26 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string&
|
|||||||
if (m_state == system_state::stopped)
|
if (m_state == system_state::stopped)
|
||||||
{
|
{
|
||||||
std::tie(m_path, m_path_original, argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_path) = std::move(save_args);
|
std::tie(m_path, m_path_original, argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_path) = std::move(save_args);
|
||||||
|
|
||||||
|
if (result != game_boot_result::no_errors)
|
||||||
|
{
|
||||||
|
GetCallbacks().close_gs_frame();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ensure(m_state == system_state::stopping);
|
ensure(m_state == system_state::stopping);
|
||||||
|
|
||||||
// Execute after Kill() is done
|
// Execute after Kill() is done
|
||||||
Emu.after_kill_callback = [save_args = std::move(save_args), this]() mutable
|
Emu.after_kill_callback = [this, result, save_args = std::move(save_args)]() mutable
|
||||||
{
|
{
|
||||||
std::tie(m_path, m_path_original, argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_path) = std::move(save_args);
|
std::tie(m_path, m_path_original, argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_path) = std::move(save_args);
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result != game_boot_result::no_errors)
|
if (result != game_boot_result::no_errors)
|
||||||
{
|
{
|
||||||
GetCallbacks().close_gs_frame();
|
GetCallbacks().close_gs_frame();
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user