From ada4242c014d791379c02bf4222a39a9e881a692 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 6 Jun 2021 17:54:06 -0700 Subject: hle: kernel: k_server_session: Return service thread by strong pointer. --- src/core/hle/kernel/hle_ipc.h | 6 +++--- src/core/hle/kernel/k_server_session.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 159565203..2aaf93fca 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 GetServiceThread() const { - return service_thread; + std::shared_ptr GetServiceThread() const { + return service_thread.lock(); } protected: @@ -152,7 +152,7 @@ public: session_handler = std::move(handler); } - std::weak_ptr GetServiceThread() const { + std::shared_ptr 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.cpp index 96c8d7b0e..b231f8183 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::Memor context->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 { -- cgit v1.2.3