Qt: Fix possible race when shutting down (Mac)

This commit is contained in:
Connor McLaughlin 2022-05-04 14:01:22 +10:00 committed by refractionpcsx2
parent deeda519b0
commit 344c918b65
1 changed files with 1 additions and 1 deletions

View File

@ -723,7 +723,7 @@ bool MainWindow::requestShutdown(bool allow_confirm /* = true */, bool allow_sav
if (block_until_done || QtHost::InBatchMode())
{
// we need to yield here, since the display gets destroyed
while (VMManager::HasValidVM())
while (VMManager::GetState() != VMState::Shutdown)
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 1);
}