diff options
author | Jim Ingham <jingham@apple.com> | 2011-12-01 20:26:15 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-12-01 20:26:15 +0000 |
commit | 87c665fb8d78b085fd11ba0795393a18f5a79391 (patch) | |
tree | d0de0a8ee97b2c0c510277e1837c28e905807401 | |
parent | c206366fd7774aff222578c2680b931a4c2c35ba (diff) | |
download | bcm5719-llvm-87c665fb8d78b085fd11ba0795393a18f5a79391.tar.gz bcm5719-llvm-87c665fb8d78b085fd11ba0795393a18f5a79391.zip |
Protect a few log->Printf calls with "if (log)"...
llvm-svn: 145625
-rw-r--r-- | lldb/source/Target/Process.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index f1e8f822335..e8016263da6 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -3231,7 +3231,8 @@ Process::ProcessEventData::DoOnRemoval (Event *event_ptr) if (curr_thread_list.GetSize() != num_threads) { lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_PROCESS)); - log->Printf("Number of threads changed from %d to %d while processing event.", num_threads, curr_thread_list.GetSize()); + if (log) + log->Printf("Number of threads changed from %d to %d while processing event.", num_threads, curr_thread_list.GetSize()); break; } @@ -3240,10 +3241,11 @@ Process::ProcessEventData::DoOnRemoval (Event *event_ptr) if (thread_sp->GetIndexID() != thread_index_array[idx]) { lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_PROCESS)); - log->Printf("The thread at position %d changed from %d to %d while processing event.", - idx, - thread_index_array[idx], - thread_sp->GetIndexID()); + if (log) + log->Printf("The thread at position %d changed from %d to %d while processing event.", + idx, + thread_index_array[idx], + thread_sp->GetIndexID()); break; } |