Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

Qt: Shutdown emulation session only if EmuThread exists.

bunneic3bd7979175d
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index f115c5b6a6..7b028e323b 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -337,7 +337,9 @@ void GMainWindow::closeEvent(QCloseEvent* event)
settings.setValue("firstStart", false);
SaveHotkeys(settings);
- ShutdownGame();
+ // Shutdown session if the emu thread is active...
+ if (emu_thread != nullptr)
+ ShutdownGame();
render_window->close();