From 2577f65b800c44e289f1c0087d51fe8eb4c06bb9 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 9 Sep 2013 21:39:38 -0700 Subject: [PATCH] Reset waits when terminating a thread. Terminated threads can't be waiting. --- Core/HLE/sceKernelThread.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 4363dff890..a33e6a036a 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -1738,6 +1738,10 @@ void __KernelStopThread(SceUID threadID, int exitStatus, const char *reason) } } t->waitingThreads.clear(); + + // Stopped threads are never waiting. + t->nt.waitType = WAITTYPE_NONE; + t->nt.waitID = 0; } else ERROR_LOG_REPORT(SCEKERNEL, "__KernelStopThread: thread %d does not exist", threadID);