[Lldb-commits] [lldb] r122429 - /lldb/trunk/source/Core/Broadcaster.cpp
Johnny Chen
johnny.chen at apple.com
Wed Dec 22 11:29:31 PST 2010
Author: johnny
Date: Wed Dec 22 13:29:31 2010
New Revision: 122429
URL: http://llvm.org/viewvc/llvm-project?rev=122429&view=rev
Log:
Broadcaster::AddListener(): Bail out early if the passed in Listener pointer is
NULL, instead of registering a NULL listener and to crash later.
Modified:
lldb/trunk/source/Core/Broadcaster.cpp
Modified: lldb/trunk/source/Core/Broadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Broadcaster.cpp?rev=122429&r1=122428&r2=122429&view=diff
==============================================================================
--- lldb/trunk/source/Core/Broadcaster.cpp (original)
+++ lldb/trunk/source/Core/Broadcaster.cpp Wed Dec 22 13:29:31 2010
@@ -102,6 +102,9 @@
uint32_t
Broadcaster::AddListener (Listener* listener, uint32_t event_mask)
{
+ if (listener == NULL)
+ return 0;
+
Mutex::Locker locker(m_listeners_mutex);
collection::iterator pos, end = m_listeners.end();
More information about the lldb-commits
mailing list