diff options
author | FearlessTobi <thm.frey@gmail.com> | 2022-08-03 19:45:13 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2022-08-15 20:25:42 +0200 |
commit | 72ff5cd4452b51648d91f952c5820cc9b6dfab68 (patch) | |
tree | 8f111c6ec9513d22db27d7b397afad5c7753c1b7 /src/yuzu/main.cpp | |
parent | 5cd95fa949492c4da0bf2de93ac902f1838aa340 (diff) |
yuzu: Fix crash on shutdown
Previously, accessing the room_network when it was already freed would crash the emulator on shutdown.
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 8bd1f92f7..e103df977 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -492,8 +492,6 @@ GMainWindow::~GMainWindow() { delete render_window; } - system->GetRoomNetwork().Shutdown(); - #ifdef __linux__ ::close(sig_interrupt_fds[0]); ::close(sig_interrupt_fds[1]); @@ -3831,6 +3829,7 @@ void GMainWindow::closeEvent(QCloseEvent* event) { render_window->close(); multiplayer_state->Close(); + system->GetRoomNetwork().Shutdown(); QWidget::closeEvent(event); } |