When stops and unloads self module, make sure that the thread is properly deleted.

This commit is contained in:
shenweip
2020-10-31 23:25:52 +08:00
parent f3c05cb81a
commit f5afd98226
+1 -1
View File
@@ -2362,7 +2362,7 @@ void __KernelReturnFromModuleFunc()
{
if (module->nm.status == MODULE_STATUS_UNLOADING) {
// TODO: Maybe should maintain the exitCode?
sceKernelDeleteThread(it->threadID);
sceKernelTerminateDeleteThread(it->threadID);
} else {
if (it->statusPtr != 0)
Memory::Write_U32(exitStatus, it->statusPtr);