[Lldb-commits] [lldb] r138146 - /lldb/trunk/source/Core/Communication.cpp
Greg Clayton
gclayton at apple.com
Fri Aug 19 16:28:37 PDT 2011
Author: gclayton
Date: Fri Aug 19 18:28:37 2011
New Revision: 138146
URL: http://llvm.org/viewvc/llvm-project?rev=138146&view=rev
Log:
Fixed an issue where even if the communication object had Clear() called on
it, it could try and call through to an installed callback.
Modified:
lldb/trunk/source/Core/Communication.cpp
Modified: lldb/trunk/source/Core/Communication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Communication.cpp?rev=138146&r1=138145&r2=138146&view=diff
==============================================================================
--- lldb/trunk/source/Core/Communication.cpp (original)
+++ lldb/trunk/source/Core/Communication.cpp Fri Aug 19 18:28:37 2011
@@ -64,6 +64,7 @@
void
Communication::Clear()
{
+ SetReadThreadBytesReceivedCallback (NULL, NULL);
StopReadThread (NULL);
Disconnect (NULL);
}
@@ -295,7 +296,7 @@
// If the user registered a callback, then call it and do not broadcast
m_callback (m_callback_baton, bytes, len);
}
- else
+ else if (bytes != NULL && len > 0)
{
Mutex::Locker locker(m_bytes_mutex);
m_bytes.append ((const char *)bytes, len);
More information about the lldb-commits
mailing list