Destroy the MainWindow at the end of run()/close() functions

This explicit reset() was included for the editor_benchmark in
19037a2e69 but it should be at the end
of the close() function.

This fixes a failing ASSERT() in ~DocObserverWidget when we destroy
the ContextBar.
This commit is contained in:
David Capello 2024-12-07 12:00:31 -03:00
parent 99dad9f349
commit b6f27a2718
1 changed files with 3 additions and 3 deletions

View File

@ -595,9 +595,6 @@ void App::run()
void App::close()
{
// Just in case close the main window.
m_mainWindow.reset(nullptr);
if (isGui()) {
ExitGui();
@ -608,6 +605,9 @@ void App::close()
// exceptions, and we are not in a destructor).
m_modules->deleteDataRecovery();
}
// Just in case close the main window.
m_mainWindow.reset(nullptr);
}
// Finishes the Aseprite application.