diff options
author | FearlessTobi <[email protected]> | 2022-08-27 03:12:12 +0200 |
---|---|---|
committer | FearlessTobi <[email protected]> | 2022-08-27 03:12:12 +0200 |
commit | d92826963ad15415ad18b2b56144e5eafb68ac5f (patch) | |
tree | c2d22077de4c06f05b9f549933a3c854c83ebbe1 /src/core/hle/service/sockets | |
parent | e431cb8d1606b4d43b091f0de64aefeb19ce88bf (diff) | |
download | yuzu-mainline-d92826963ad15415ad18b2b56144e5eafb68ac5f.tar.gz yuzu-mainline-d92826963ad15415ad18b2b56144e5eafb68ac5f.zip |
core/bsd: Correctly unbind methods in destructor
Prevents yuzu from crashing when the BSD service is created a second time.
Diffstat (limited to 'src/core/hle/service/sockets')
-rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index e08c3cb67..cc679cc81 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -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 |