diff options
Diffstat (limited to 'src')
| -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() { | |||
| 1839 | 1839 | ||
| 1840 | void GMainWindow::OnEmulationStopped() { | 1840 | void GMainWindow::OnEmulationStopped() { |
| 1841 | shutdown_timer.stop(); | 1841 | shutdown_timer.stop(); |
| 1842 | emu_thread->disconnect(); | 1842 | if (emu_thread) { |
| 1843 | emu_thread->wait(); | 1843 | emu_thread->disconnect(); |
| 1844 | emu_thread = nullptr; | 1844 | emu_thread->wait(); |
| 1845 | emu_thread.reset(); | ||
| 1846 | } | ||
| 1845 | 1847 | ||
| 1846 | if (shutdown_dialog) { | 1848 | if (shutdown_dialog) { |
| 1847 | shutdown_dialog->deleteLater(); | 1849 | shutdown_dialog->deleteLater(); |
| @@ -3029,6 +3031,8 @@ void GMainWindow::OnStopGame() { | |||
| 3029 | 3031 | ||
| 3030 | if (OnShutdownBegin()) { | 3032 | if (OnShutdownBegin()) { |
| 3031 | OnShutdownBeginDialog(); | 3033 | OnShutdownBeginDialog(); |
| 3034 | } else { | ||
| 3035 | OnEmulationStopped(); | ||
| 3032 | } | 3036 | } |
| 3033 | } | 3037 | } |
| 3034 | 3038 | ||