aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc/svc_activity.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-13 10:44:41 -0500
committerLiam <byteslice@airmail.cc>2023-02-13 11:05:14 -0500
commit4363ca304afb0b615481c7d49e863a2c429cc5c6 (patch)
tree80dbba25e98a8493944993f8992326b797305088 /src/core/hle/kernel/svc/svc_activity.cpp
parent770a49616d9f9772ffd6c1648a25da4abd4338e2 (diff)
kernel: use GetCurrentProcess
Diffstat (limited to 'src/core/hle/kernel/svc/svc_activity.cpp')
-rw-r--r--src/core/hle/kernel/svc/svc_activity.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc/svc_activity.cpp b/src/core/hle/kernel/svc/svc_activity.cpp
index 1dcdb7a15..2e7b680d0 100644
--- a/src/core/hle/kernel/svc/svc_activity.cpp
+++ b/src/core/hle/kernel/svc/svc_activity.cpp
@@ -23,11 +23,12 @@ Result SetThreadActivity(Core::System& system, Handle thread_handle,
// Get the thread from its handle.
KScopedAutoObject thread =
- system.Kernel().CurrentProcess()->GetHandleTable().GetObject<KThread>(thread_handle);
+ GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(thread_handle);
R_UNLESS(thread.IsNotNull(), ResultInvalidHandle);
// Check that the activity is being set on a non-current thread for the current process.
- R_UNLESS(thread->GetOwnerProcess() == system.Kernel().CurrentProcess(), ResultInvalidHandle);
+ R_UNLESS(thread->GetOwnerProcess() == GetCurrentProcessPointer(system.Kernel()),
+ ResultInvalidHandle);
R_UNLESS(thread.GetPointerUnsafe() != GetCurrentThreadPointer(system.Kernel()), ResultBusy);
// Set the activity.