core/bsd: Correctly unbind methods in destructor

Prevents yuzu from crashing when the BSD service is created a second time.
master
FearlessTobi 2022-08-27 03:12:12 +07:00
parent e431cb8d16
commit d92826963a
1 changed files with 5 additions and 1 deletions

@ -933,7 +933,11 @@ BSD::BSD(Core::System& system_, const char* name)
}
}
BSD::~BSD() = default;
BSD::~BSD() {
if (auto room_member = room_network.GetRoomMember().lock()) {
room_member->Unbind(proxy_packet_received);
}
}
BSDCFG::BSDCFG(Core::System& system_) : ServiceFramework{system_, "bsdcfg"} {
// clang-format off