mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix an iterator corruption on tls thread autofree.
This commit is contained in:
parent
8d15cb953a
commit
8a0f854dc6
1 changed files with 8 additions and 0 deletions
|
@ -2011,7 +2011,15 @@ void __KernelTlsplThreadEnd(SceUID threadID)
|
|||
TLSPL *tls = kernelObjects.Get<TLSPL>(tlsID, error);
|
||||
|
||||
if (tls)
|
||||
{
|
||||
__KernelFreeTls(tls, threadID);
|
||||
|
||||
// Restart the loop, freeing mutated it.
|
||||
locked = tlsplThreadEndChecks.equal_range(threadID);
|
||||
iter = locked.first;
|
||||
if (locked.first == locked.second)
|
||||
break;
|
||||
}
|
||||
}
|
||||
tlsplThreadEndChecks.erase(locked.first, locked.second);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue