forked from OSchip/llvm-project
Broadcaster::AddListener(): Bail out early if the passed in Listener pointer is
NULL, instead of registering a NULL listener and to crash later. llvm-svn: 122429
This commit is contained in:
parent
73f7fa82e5
commit
d161a85700
|
@ -102,6 +102,9 @@ Broadcaster::AddInitialEventsToListener (Listener *listener, uint32_t requested_
|
|||
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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue