VERY experimental Nintendo Switch 2 emulator
C++
hle: kernel: k_server_session: Return service thread by strong pointer.
bunneiff57fd7281c8
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.hindex 159565203c..2aaf93fca4 100644--- a/src/core/hle/kernel/hle_ipc.h+++ b/src/core/hle/kernel/hle_ipc.h@@ -85,8 +85,8 @@ public:*/void ClientDisconnected(KServerSession* session);- std::weak_ptr<ServiceThread> GetServiceThread() const {- return service_thread;+ std::shared_ptr<ServiceThread> GetServiceThread() const {+ return service_thread.lock();}protected:@@ -152,7 +152,7 @@ public:session_handler = std::move(handler);}- std::weak_ptr<ServiceThread> GetServiceThread() const {+ std::shared_ptr<ServiceThread> GetServiceThread() const {return session_handler->GetServiceThread();}diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cppindex 96c8d7b0ee..b231f8183c 100644--- a/src/core/hle/kernel/k_server_session.cpp+++ b/src/core/hle/kernel/k_server_session.cpp@@ -119,7 +119,7 @@ ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memorcontext->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf);- if (auto strong_ptr = manager->GetServiceThread().lock(); strong_ptr) {+ if (auto strong_ptr = manager->GetServiceThread(); strong_ptr) {strong_ptr->QueueSyncRequest(*parent, std::move(context));return ResultSuccess;} else {