mirror of https://github.com/PCSX2/pcsx2.git
Qt: Fix crash on shutdown settings save
This commit is contained in:
parent
056a8d0274
commit
d5290e93a8
|
@ -1298,13 +1298,17 @@ void QtHost::SaveSettings()
|
||||||
pxAssertRel(!g_emu_thread->isOnEmuThread(), "Saving should happen on the UI thread.");
|
pxAssertRel(!g_emu_thread->isOnEmuThread(), "Saving should happen on the UI thread.");
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Error error;
|
||||||
auto lock = Host::GetSettingsLock();
|
auto lock = Host::GetSettingsLock();
|
||||||
if (!s_base_settings_interface->Save())
|
if (!s_base_settings_interface->Save(&error))
|
||||||
Console.Error("Failed to save settings.");
|
Console.ErrorFmt("Failed to save settings: {}", error.GetDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s_settings_save_timer)
|
||||||
|
{
|
||||||
s_settings_save_timer->deleteLater();
|
s_settings_save_timer->deleteLater();
|
||||||
s_settings_save_timer.release();
|
s_settings_save_timer.release();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Host::CommitBaseSettingChanges()
|
void Host::CommitBaseSettingChanges()
|
||||||
|
|
Loading…
Reference in New Issue