diff --git a/mozilla/xpcom/ds/nsObserverList.cpp b/mozilla/xpcom/ds/nsObserverList.cpp index 1aa61b5f843..cfb31ebc045 100644 --- a/mozilla/xpcom/ds/nsObserverList.cpp +++ b/mozilla/xpcom/ds/nsObserverList.cpp @@ -196,7 +196,7 @@ ObserverListEnumerator::GetNext(nsISupports** aResult) if ( weakRefFactory ) { nsCOMPtr weakref = do_QueryReferent(weakRefFactory); NS_RELEASE(*aResult); - NS_ADDREF(*aResult = weakref); + NS_IF_ADDREF(*aResult = weakref); return NS_OK; }