mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
Kernel: Fix delete thread null check.
This commit is contained in:
parent
bd1ed897cf
commit
9af0397e84
@ -1648,18 +1648,21 @@ u32 __KernelDeleteThread(SceUID threadID, int exitStatus, const char *reason)
|
||||
}
|
||||
|
||||
t->Cleanup();
|
||||
}
|
||||
|
||||
// Before triggering, set v0. It'll be restored if one is called.
|
||||
RETURN(error);
|
||||
t->nt.status = THREADSTATUS_DEAD;
|
||||
// Before triggering, set v0. It'll be restored if one is called.
|
||||
RETURN(error);
|
||||
t->nt.status = THREADSTATUS_DEAD;
|
||||
|
||||
if (__KernelThreadTriggerEvent((t->nt.attr & PSP_THREAD_ATTR_KERNEL) != 0, threadID, THREADEVENT_DELETE)) {
|
||||
// Don't delete it yet. We'll delete later.
|
||||
pendingDeleteThreads.push_back(threadID);
|
||||
return 0;
|
||||
if (__KernelThreadTriggerEvent((t->nt.attr & PSP_THREAD_ATTR_KERNEL) != 0, threadID, THREADEVENT_DELETE)) {
|
||||
// Don't delete it yet. We'll delete later.
|
||||
pendingDeleteThreads.push_back(threadID);
|
||||
return 0;
|
||||
} else {
|
||||
return kernelObjects.Destroy<Thread>(threadID);
|
||||
}
|
||||
} else {
|
||||
return kernelObjects.Destroy<Thread>(threadID);
|
||||
RETURN(error);
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user