Qt: Fix crash when closing window while game running

This commit is contained in:
Vicki Pfau 2019-01-26 09:45:02 -08:00
parent 9b1c3e5396
commit 2f54fc732e
1 changed files with 4 additions and 2 deletions

View File

@ -782,11 +782,13 @@ void Window::gameStopped() {
m_screenWidget->setLockAspectRatio(true);
m_screenWidget->setPixmap(m_logo);
m_screenWidget->unsetCursor();
if (m_display) {
#ifdef M_CORE_GB
m_display->setMinimumSize(GB_VIDEO_HORIZONTAL_PIXELS, GB_VIDEO_VERTICAL_PIXELS);
m_display->setMinimumSize(GB_VIDEO_HORIZONTAL_PIXELS, GB_VIDEO_VERTICAL_PIXELS);
#elif defined(M_CORE_GBA)
m_display->setMinimumSize(VIDEO_HORIZONTAL_PIXELS, VIDEO_VERTICAL_PIXELS);
m_display->setMinimumSize(VIDEO_HORIZONTAL_PIXELS, VIDEO_VERTICAL_PIXELS);
#endif
}
m_videoLayers->clear();
m_audioChannels->clear();