Add a safety check to prevent leaks.

This commit is contained in:
Unknown W. Brackets 2013-05-18 20:20:41 -07:00
parent 0fb5877d75
commit ead70f56d9

View File

@ -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();
}