Check the return value of GetBasicInfo before dereferencing it. <rdar://problem/10568492>

llvm-svn: 147883
This commit is contained in:
Jim Ingham 2012-01-10 22:21:42 +00:00
parent 21b3b298c4
commit 82283e8e91
1 changed files with 7 additions and 2 deletions

View File

@ -95,8 +95,13 @@ MachThread::SetSuspendCountBeforeResume(bool others_stopped)
if (others_stopped)
{
times_to_resume = GetBasicInfo()->suspend_count;
m_suspend_count = - (times_to_resume - m_suspend_count);
if (GetBasicInfo())
{
times_to_resume = m_basic_info.suspend_count;
m_suspend_count = - (times_to_resume - m_suspend_count);
}
else
times_to_resume = 0;
}
else
{