Merge pull request #13608 from shenweip/stopunloadselfmodule

When stops and unloads self module, make sure that the thread is properly deleted.
This commit is contained in:
Henrik Rydgård
2020-10-31 23:03:33 +01:00
committed by GitHub
+1 -1
View File
@@ -2361,7 +2361,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);