fix: ignore save requests after closing all windows (#5081)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user