mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-26 07:43:36 +01:00
Fix an iterator corruption on tls thread autofree.
This commit is contained in:
1 parent
8d15cb953a
commit
8a0f854dc6
1 file changed
+8
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user