mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 13:25:45 +00:00
kernel: svc: Add missing error check to CancelSynchronization.
- Avoids a potential crash if the handle is invalid, and also makes this code accurate to real kernel behavior.
This commit is contained in:
parent
7b6da43bbf
commit
d06f7d9f6c
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue