hle: kernel: k_server_session: Return service thread by strong pointer.

This commit is contained in:
bunnei 2021-06-06 17:54:06 -07:00
parent 93f93cb8bc
commit ada4242c01
2 changed files with 4 additions and 4 deletions

View File

@ -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();
}

View File

@ -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 {