Destroy the main window at the very end

So we can check asserts on the Workspace about empty panels.
This commit is contained in:
David Capello 2019-06-05 10:21:18 -03:00
parent ad64deef6c
commit 013f10363f

View File

@ -411,9 +411,6 @@ void App::run()
// Select no document // Select no document
m_modules->m_context.setActiveView(nullptr); m_modules->m_context.setActiveView(nullptr);
// Destroy the window.
m_mainWindow.reset(nullptr);
// Delete backups (this is a normal shutdown, we are not handling // Delete backups (this is a normal shutdown, we are not handling
// exceptions, and we are not in a destructor). // exceptions, and we are not in a destructor).
m_modules->deleteDataRecovery(); m_modules->deleteDataRecovery();
@ -441,6 +438,13 @@ void App::run()
doc->close(); doc->close();
delete doc; delete doc;
} }
#ifdef ENABLE_UI
if (isGui()) {
// Destroy the window.
m_mainWindow.reset(nullptr);
}
#endif
} }
// Finishes the Aseprite application. // Finishes the Aseprite application.