[Lldb-commits] [lldb] r200504 - Check curr_thread is not empty before accessing it.

Jim Ingham jingham at apple.com
Thu Jan 30 17:01:24 PST 2014


Author: jingham
Date: Thu Jan 30 19:01:23 2014
New Revision: 200504

URL: http://llvm.org/viewvc/llvm-project?rev=200504&view=rev
Log:
Check curr_thread is not empty before accessing it.

<rdar://problem/15953271>

Modified:
    lldb/trunk/source/Core/Debugger.cpp

Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=200504&r1=200503&r2=200504&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Thu Jan 30 19:01:23 2014
@@ -2913,7 +2913,7 @@ Debugger::HandleProcessEvent (const Even
                                 thread_list.SetSelectedThreadByID (other_thread->GetID());
                             else
                             {
-                                if (curr_thread->IsValid())
+                                if (curr_thread && curr_thread->IsValid())
                                     thread = curr_thread;
                                 else
                                     thread = thread_list.GetThreadAtIndex(0);





More information about the lldb-commits mailing list