In ThreadList::GetSelectedThread, handle the case where we have no
valid threads - can happen if attaching to a process fails in a certain way. llvm-svn: 139567
This commit is contained in:
parent
542adbfccf
commit
354b9a65f9
|
@ -548,6 +548,8 @@ ThreadList::GetSelectedThread ()
|
|||
ThreadSP thread_sp = FindThreadByID(m_selected_tid);
|
||||
if (!thread_sp.get())
|
||||
{
|
||||
if (m_threads.size() == 0)
|
||||
return thread_sp;
|
||||
m_selected_tid = m_threads[0]->GetID();
|
||||
thread_sp = m_threads[0];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue