summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2021-06-10 01:08:36 +0200
committerGitHub <noreply@github.com>2021-06-10 01:08:36 +0200
commit61c7a81ec883d9d4e49fab9467b9d1d064a56c58 (patch)
tree39910198e1a7668a6cc15578bc2d7a15aab20b04
parentMerge pull request #6436 from liushuyu/master (diff)
parentkernel: svc: Add missing error check to CancelSynchronization. (diff)
downloadyuzu-61c7a81ec883d9d4e49fab9467b9d1d064a56c58.tar
yuzu-61c7a81ec883d9d4e49fab9467b9d1d064a56c58.tar.gz
yuzu-61c7a81ec883d9d4e49fab9467b9d1d064a56c58.tar.bz2
yuzu-61c7a81ec883d9d4e49fab9467b9d1d064a56c58.tar.lz
yuzu-61c7a81ec883d9d4e49fab9467b9d1d064a56c58.tar.xz
yuzu-61c7a81ec883d9d4e49fab9467b9d1d064a56c58.tar.zst
yuzu-61c7a81ec883d9d4e49fab9467b9d1d064a56c58.zip
-rw-r--r--src/core/hle/kernel/svc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 28bcae6e7..8339e11a0 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();