mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-05 04:40:00 +00:00
hle: kernel: k_server_session: Ensure service thread is valid before dereference.
This commit is contained in:
parent
384cbe3829
commit
93f93cb8bc
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue