Invoke QCoreApplication::quit() on the main thread

This is required to safely synchronize with the main loop.
This commit is contained in:
Cameron Gutman committed 2026-11-12 20:22:02 -06:00
1 parent 67dbfddb20
commit aad0090d97
2 files changed
+11 -3

No files matched your search

+6 -2
View File
@@ -381,8 +381,12 @@ int SDLCALL signalHandlerThread(void* data)
_Exit(1);
}
// If we're not streaming, we'll close the whole app
QCoreApplication::instance()->quit();
// If we're not streaming, we'll close the whole app on the main thread
if (QCoreApplication* app = QCoreApplication::instance()) {
QMetaObject::invokeMethod(app, []() {
QCoreApplication::quit();
}, Qt::QueuedConnection);
}
requestedQuit = true;
}
break;