Skip to content

Commit

Permalink
Qt: Fix crash on shutdown settings save
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Apr 5, 2024
1 parent 056a8d0 commit d5290e9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pcsx2-qt/QtHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1298,13 +1298,17 @@ 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());
}

s_settings_save_timer->deleteLater();
s_settings_save_timer.release();
if (s_settings_save_timer)
{
s_settings_save_timer->deleteLater();
s_settings_save_timer.release();
}
}

void Host::CommitBaseSettingChanges()
Expand Down

0 comments on commit d5290e9

Please sign in to comment.