Qt: Fix crash on shutdown settings save

This commit is contained in:
Stenzek 2024-04-05 20:08:36 +10:00 committed by Connor McLaughlin
parent 056a8d0274
commit d5290e93a8
1 changed files with 8 additions and 4 deletions

View File

@ -1298,14 +1298,18 @@ void QtHost::SaveSettings()
pxAssertRel(!g_emu_thread->isOnEmuThread(), "Saving should happen on the UI thread.");
{
Error error;
auto lock = Host::GetSettingsLock();
if (!s_base_settings_interface->Save())
Console.Error("Failed to save settings.");
if (!s_base_settings_interface->Save(&error))
Console.ErrorFmt("Failed to save settings: {}", error.GetDescription());
}
if (s_settings_save_timer)
{
s_settings_save_timer->deleteLater();
s_settings_save_timer.release();
}
}
void Host::CommitBaseSettingChanges()
{