don't let the emuthread deinit OGL if there's no OGL

This commit is contained in:
RSDuck 2022-10-13 19:55:06 +02:00
parent af8efe1119
commit 2f9e0a4384
1 changed files with 6 additions and 3 deletions

View File

@ -1891,9 +1891,12 @@ MainWindow::~MainWindow()
void MainWindow::closeEvent(QCloseEvent* event)
{
printf("close event\n");
emuThread->emuPause();
emuThread->deinitContext();
if (hasOGL)
{
// we intentionally don't unpause here
emuThread->emuPause();
emuThread->deinitContext();
}
QMainWindow::closeEvent(event);
}