osd/modules/debugger/debugqt.cpp: Don't try closing windows if debugger console wasn't created.

This commit is contained in:
Vas Crabb 2022-09-21 10:46:06 +10:00
parent 19c15659dc
commit 00418d9406

View File

@ -103,10 +103,12 @@ void debug_qt::exit()
{
// If you've done a hard reset, clear out existing widgets
if (m_mainwindow)
{
m_mainwindow->setExiting();
QApplication::closeAllWindows();
qApp->processEvents(QEventLoop::AllEvents, 1);
m_mainwindow = nullptr;
QApplication::closeAllWindows();
qApp->processEvents(QEventLoop::AllEvents, 1);
m_mainwindow = nullptr;
}
}