Add a safety check to prevent leaks.
This commit is contained in:
parent
0fb5877d75
commit
ead70f56d9
1 changed files with 6 additions and 0 deletions
|
@ -394,6 +394,12 @@ public:
|
|||
|
||||
~Thread()
|
||||
{
|
||||
if (pushedStacks.size() != 0)
|
||||
{
|
||||
WARN_LOG_REPORT(HLE, "Thread ended within an extended stack");
|
||||
for (size_t i = 0; i < pushedStacks.size(); ++i)
|
||||
userMemory.Free(pushedStacks[i].start);
|
||||
}
|
||||
FreeStack();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue