mirror of
https://github.com/libretro/ppsspp.git
synced 2025-03-03 14:09:45 +00:00
Fix an iterator corruption on tls thread autofree.
This commit is contained in:
parent
8d15cb953a
commit
8a0f854dc6
@ -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…
x
Reference in New Issue
Block a user