From f6b9b7910eb59cdc1e3aea9a1f1cb3d1cf8ae7f6 Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 25 Nov 2019 18:17:08 -0500 Subject: kernel: Fix reference management for client/server session. - Fixes shutdown crash and crash in Pokemon SwSh. --- src/core/hle/kernel/session.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/session.h') diff --git a/src/core/hle/kernel/session.h b/src/core/hle/kernel/session.h index ea956813b..94395f9f5 100644 --- a/src/core/hle/kernel/session.h +++ b/src/core/hle/kernel/session.h @@ -20,8 +20,8 @@ class ServerSession; */ class Session final { public: - ClientSession* client = nullptr; ///< The client endpoint of the session. - ServerSession* server = nullptr; ///< The server endpoint of the session. + std::weak_ptr client; ///< The client endpoint of the session. + std::weak_ptr server; ///< The server endpoint of the session. std::shared_ptr port; ///< The port that this session is associated with (optional). }; } // namespace Kernel -- cgit v1.2.3