fix: ignore save requests after closing all windows (#5081)

This commit is contained in:
nerix
2024-01-14 13:37:03 +01:00
committed by GitHub
parent 13ff11ea75
commit 292f9b9734
3 changed files with 13 additions and 1 deletions
+11 -1
View File
@@ -421,7 +421,14 @@ void WindowManager::save()
{
return;
}
qCDebug(chatterinoWindowmanager) << "[WindowManager] Saving";
if (this->shuttingDown_)
{
qCDebug(chatterinoWindowmanager) << "Skipping save (shutting down)";
return;
}
qCDebug(chatterinoWindowmanager) << "Saving";
assertInGuiThread();
QJsonDocument document;
@@ -700,6 +707,9 @@ void WindowManager::closeAll()
{
assertInGuiThread();
qCDebug(chatterinoWindowmanager) << "Shutting down (closing windows)";
this->shuttingDown_ = true;
for (Window *window : windows_)
{
window->close();