diff --git a/mailnews/base/src/nsUrlListenerManager.cpp b/mailnews/base/src/nsUrlListenerManager.cpp index c3454f6ae80..139a3e53343 100644 --- a/mailnews/base/src/nsUrlListenerManager.cpp +++ b/mailnews/base/src/nsUrlListenerManager.cpp @@ -48,7 +48,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS(nsUrlListenerManager, nsIUrlListenerManager::GetIID nsresult nsUrlListenerManager::RegisterListener(nsIUrlListener * aUrlListener) { - if (m_listeners) + if (m_listeners && aUrlListener) m_listeners->AppendElement(aUrlListener); return NS_OK;