Don't double decrease g_inCbCount.
Happened when a thread was deleted, it seems like. Fixes #6542.
This commit is contained in:
parent
88cfcf7e26
commit
ef4847b6f5
2 changed files with 6 additions and 3 deletions
|
@ -3385,8 +3385,10 @@ void __KernelReturnFromMipsCall()
|
|||
currentMIPS->r[MIPS_REG_V1] = call->savedV1;
|
||||
cur->currentMipscallId = call->savedId;
|
||||
|
||||
if (call->cbId != 0)
|
||||
// IF the thread called ExitDelete, we might've alreayd decreased g_inCbCount.
|
||||
if (call->cbId != 0 && g_inCbCount > 0) {
|
||||
g_inCbCount--;
|
||||
}
|
||||
currentCallbackThreadID = 0;
|
||||
|
||||
if (cur->nt.waitType != WAITTYPE_NONE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue