Fix crash when Aseprite is being closed

This commit is contained in:
David Capello 2018-08-13 21:33:59 -03:00
parent 1c3c21a6d5
commit 09e40319f7

View File

@ -78,6 +78,12 @@ void UIContext::setActiveView(DocView* docView)
{
MainWindow* mainWin = App::instance()->mainWindow();
// This can happen when the main window is being destroyed when we
// close the app, and the active view is changing because we are
// closing down every single tab.
if (!mainWin)
return;
// Prioritize workspace for user input.
App::instance()->inputChain().prioritize(mainWin->getWorkspace(), nullptr);