Test to see if logging is enabled before printing
to a log channel in StopInfoBreakpoint::PerformAction().
<rdar://problem/14651751> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187833 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/StopInfo.cpp b/source/Target/StopInfo.cpp
index 2479368..81b9d86 100644
--- a/source/Target/StopInfo.cpp
+++ b/source/Target/StopInfo.cpp
@@ -324,7 +324,10 @@
             if (!thread_sp->IsValid())
             {
                 // This shouldn't ever happen, but just in case, don't do more harm.
-                log->Printf ("PerformAction got called with an invalid thread.");
+                if (log)
+                {
+                    log->Printf ("PerformAction got called with an invalid thread.");
+                }
                 m_should_stop = true;
                 m_should_stop_is_valid = true;
                 return;