diff options
author | Liam <byteslice@airmail.cc> | 2023-01-07 00:50:01 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-01-07 00:50:01 +0100 |
commit | 9ed4c1375885191971794315cffae5f6a8dd9e34 (patch) | |
tree | 85a6b111202dbcfb181f6d9eb8783888011f8750 | |
parent | Merge pull request #9566 from Wollnashorn/vulkan-cache-header-fix (diff) | |
download | yuzu-9ed4c1375885191971794315cffae5f6a8dd9e34.tar yuzu-9ed4c1375885191971794315cffae5f6a8dd9e34.tar.gz yuzu-9ed4c1375885191971794315cffae5f6a8dd9e34.tar.bz2 yuzu-9ed4c1375885191971794315cffae5f6a8dd9e34.tar.lz yuzu-9ed4c1375885191971794315cffae5f6a8dd9e34.tar.xz yuzu-9ed4c1375885191971794315cffae5f6a8dd9e34.tar.zst yuzu-9ed4c1375885191971794315cffae5f6a8dd9e34.zip |
-rw-r--r-- | src/yuzu/main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c55f81c2f..2ea3b7d59 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1839,9 +1839,11 @@ void GMainWindow::OnEmulationStopTimeExpired() { void GMainWindow::OnEmulationStopped() { shutdown_timer.stop(); - emu_thread->disconnect(); - emu_thread->wait(); - emu_thread = nullptr; + if (emu_thread) { + emu_thread->disconnect(); + emu_thread->wait(); + emu_thread.reset(); + } if (shutdown_dialog) { shutdown_dialog->deleteLater(); @@ -3029,6 +3031,8 @@ void GMainWindow::OnStopGame() { if (OnShutdownBegin()) { OnShutdownBeginDialog(); + } else { + OnEmulationStopped(); } } |