mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-27 18:25:41 -04:00
Qt: Fix crash on shutdown settings save
This commit is contained in:
parent
3d84da0ddd
commit
bdafbe0b28
@ -1820,14 +1820,18 @@ void QtHost::SaveSettings()
|
|||||||
AssertMsg(!g_emu_thread->isOnThread(), "Saving should happen on the UI thread.");
|
AssertMsg(!g_emu_thread->isOnThread(), "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))
|
||||||
Log_ErrorPrintf("Failed to save settings.");
|
Log_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 QtHost::QueueSettingsSave()
|
void QtHost::QueueSettingsSave()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user