summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-01-09 22:21:27 +0100
committerGitHub <noreply@github.com>2023-01-09 22:21:27 +0100
commit3be83121207f771de8d7806b309d5b10a394b3e7 (patch)
tree14e1e46ae48584c7f18197e8ec7b9ace10de8b08
parentMerge pull request #9583 from FernandoS27/fuck-ogl-already (diff)
parentqt: additional fixes for reentrant shutdown (diff)
downloadyuzu-3be83121207f771de8d7806b309d5b10a394b3e7.tar
yuzu-3be83121207f771de8d7806b309d5b10a394b3e7.tar.gz
yuzu-3be83121207f771de8d7806b309d5b10a394b3e7.tar.bz2
yuzu-3be83121207f771de8d7806b309d5b10a394b3e7.tar.lz
yuzu-3be83121207f771de8d7806b309d5b10a394b3e7.tar.xz
yuzu-3be83121207f771de8d7806b309d5b10a394b3e7.tar.zst
yuzu-3be83121207f771de8d7806b309d5b10a394b3e7.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp10
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();
}
}