From 69b05f99187202b7c09162e4d204f4cac7772018 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 12 Mar 2022 14:12:12 -0300 Subject: [PATCH] Fix GetUserDisableCount NRE (#3187) --- Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs b/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs index 83316b0f..9cb7945e 100644 --- a/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs +++ b/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs @@ -751,7 +751,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Process { KThread currentThread = KernelStatic.GetCurrentThread(); - if (currentThread.Owner != null && + if (currentThread.Context.Running && + currentThread.Owner != null && currentThread.GetUserDisableCount() != 0 && currentThread.Owner.PinnedThreads[currentThread.CurrentCore] == null) {