Add a safety check to prevent leaks.

This commit is contained in:
Unknown W. Brackets committed 2013-05-18 20:21:29 -07:00
1 parent 0fb5877d75
commit ead70f56d9
1 file changed
+6
+6
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();
}