[Lldb-commits] [lldb] r124109 - /lldb/trunk/source/Target/ThreadList.cpp

Greg Clayton gclayton at apple.com
Sun Jan 23 21:36:47 PST 2011


Author: gclayton
Date: Sun Jan 23 23:36:47 2011
New Revision: 124109

URL: http://llvm.org/viewvc/llvm-project?rev=124109&view=rev
Log:
Fix a crasher when you have no log.

Modified:
    lldb/trunk/source/Target/ThreadList.cpp

Modified: lldb/trunk/source/Target/ThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=124109&r1=124108&r2=124109&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadList.cpp (original)
+++ lldb/trunk/source/Target/ThreadList.cpp Sun Jan 23 23:36:47 2011
@@ -331,9 +331,10 @@
                         result = eVoteYes;
                     break;
                 case eVoteNo:
-                    log->Printf ("ThreadList::ShouldReportRun() thread %d (0x%4.4x) says don't report.", 
-                                 (*pos)->GetIndexID(), 
-                                 (*pos)->GetID());
+                    if (log)
+                        log->Printf ("ThreadList::ShouldReportRun() thread %d (0x%4.4x) says don't report.", 
+                                     (*pos)->GetIndexID(), 
+                                     (*pos)->GetID());
                     result = eVoteNo;
                     break;
             }





More information about the lldb-commits mailing list