From 93f93cb8bc4cf25cbddd2918d0edec786ecce15b Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 6 Jun 2021 17:03:36 -0700 Subject: hle: kernel: k_server_session: Ensure service thread is valid before dereference. --- src/core/hle/kernel/k_server_session.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp index 3024395dd..96c8d7b0e 100644 --- a/src/core/hle/kernel/k_server_session.cpp +++ b/src/core/hle/kernel/k_server_session.cpp @@ -119,9 +119,11 @@ ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memor context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf); - if (auto strong_ptr = manager->GetServiceThread().lock()) { + if (auto strong_ptr = manager->GetServiceThread().lock(); strong_ptr) { strong_ptr->QueueSyncRequest(*parent, std::move(context)); return ResultSuccess; + } else { + ASSERT(false, "strong_ptr was nullptr!"); } return ResultSuccess; -- cgit v1.2.3