mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-19 17:47:52 -05: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:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user