diff --git a/Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs b/Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs index ec109b2d..e382cf75 100644 --- a/Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs +++ b/Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs @@ -43,8 +43,6 @@ namespace Ryujinx.Core.OsHle.Kernel KThread OwnerThread = Process.HandleTable.GetData(OwnerThreadHandle); - Ns.Log.PrintDebug(LogClass.KernelSvc, "lock tid: " + OwnerThread.ThreadId.ToString()); - if (OwnerThread == null) { Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid owner thread handle 0x{OwnerThreadHandle:x8}!"); diff --git a/Ryujinx.Core/OsHle/Process.cs b/Ryujinx.Core/OsHle/Process.cs index c3f934af..b8c08856 100644 --- a/Ryujinx.Core/OsHle/Process.cs +++ b/Ryujinx.Core/OsHle/Process.cs @@ -345,7 +345,7 @@ namespace Ryujinx.Core.OsHle { TlsSlots.TryRemove(GetTlsSlot(Thread.ThreadState.Tpidr), out _); - KThread KernelThread = GetThread(Thread.ThreadState.Tpidr); + Threads.TryRemove(Thread.ThreadState.Tpidr, out KThread KernelThread); Scheduler.RemoveThread(KernelThread);