VERY experimental Nintendo Switch 2 emulator
C++
kernel: svc: Add missing error check to CancelSynchronization.
bunneid06f7d9f6c0b
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cppindex 28bcae6e74..8339e11a07 100644--- a/src/core/hle/kernel/svc.cpp+++ b/src/core/hle/kernel/svc.cpp@@ -449,8 +449,8 @@ static ResultCode CancelSynchronization(Core::System& system, Handle handle) {// Get the thread from its handle.KScopedAutoObject thread =- system.Kernel().CurrentProcess()->GetHandleTable().GetObject<KThread>(- static_cast<Handle>(handle));+ system.Kernel().CurrentProcess()->GetHandleTable().GetObject<KThread>(handle);+ R_UNLESS(thread.IsNotNull(), ResultInvalidHandle);// Cancel the thread's wait.thread->WaitCancel();