mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
Avoid ASSERT() fail in ~DocObserverWidget()
We have to unselect all documents before we destroy the main window, so all onActiveSiteChange()/onDocChange() are called correctly just in case.
This commit is contained in:
parent
29a6f89dc4
commit
7c26a88813
@ -407,8 +407,11 @@ void App::run()
|
|||||||
|
|
||||||
#ifdef ENABLE_UI
|
#ifdef ENABLE_UI
|
||||||
if (isGui()) {
|
if (isGui()) {
|
||||||
|
// Select no document
|
||||||
|
m_modules->m_context.setActiveView(nullptr);
|
||||||
|
|
||||||
// Destroy the window.
|
// Destroy the window.
|
||||||
m_mainWindow.reset(NULL);
|
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).
|
||||||
|
Loading…
Reference in New Issue
Block a user