mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 18:05:46 +00:00
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:
parent
0351eadbdb
commit
3fa1a0f8fa
2 changed files with 4 additions and 6 deletions
|
@ -59,7 +59,9 @@ MultiplayerState::MultiplayerState(QWidget* parent, QStandardItemModel* game_lis
|
|||
});
|
||||
}
|
||||
|
||||
MultiplayerState::~MultiplayerState() {
|
||||
MultiplayerState::~MultiplayerState() = default;
|
||||
|
||||
void MultiplayerState::Close() {
|
||||
if (state_callback_handle) {
|
||||
if (auto member = room_network.GetRoomMember().lock()) {
|
||||
member->Unbind(state_callback_handle);
|
||||
|
@ -71,9 +73,6 @@ MultiplayerState::~MultiplayerState() {
|
|||
member->Unbind(error_callback_handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MultiplayerState::Close() {
|
||||
if (host_room) {
|
||||
host_room->close();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue