forked from OSchip/llvm-project
Check the return value of GetBasicInfo before dereferencing it. <rdar://problem/10568492>
llvm-svn: 147883
This commit is contained in:
parent
21b3b298c4
commit
82283e8e91
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue