1
0
Fork 0

GUI: Fix use-after-free

This commit is contained in:
Nukem 2015-12-10 17:18:01 -05:00
parent 072d75ee43
commit 5887ac8ae2
1 changed files with 1 additions and 1 deletions

View File

@ -383,10 +383,10 @@ void ThreadView::updateThreadList()
mCurrentThreadId = "NONE";
if(threadList.count)
{
BridgeFree(threadList.list);
int currentThread = threadList.CurrentThread;
if(currentThread >= 0 && currentThread < threadList.count)
mCurrentThreadId = ToHexString(threadList.list[currentThread].BasicInfo.ThreadId);
BridgeFree(threadList.list);
}
reloadData();
}