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>
This commit is contained in:
FearlessTobi 2022-08-03 19:45:13 +02:00
parent 5cd95fa949
commit 72ff5cd445
2 changed files with 4 additions and 6 deletions

View file

@ -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);
}