check for null. if the reference ever goes away, we crash
This commit is contained in:
Родитель
5e626fd436
Коммит
197b257b94
|
@ -196,7 +196,7 @@ ObserverListEnumerator::GetNext(nsISupports** aResult)
|
||||||
if ( weakRefFactory ) {
|
if ( weakRefFactory ) {
|
||||||
nsCOMPtr<nsISupports> weakref = do_QueryReferent(weakRefFactory);
|
nsCOMPtr<nsISupports> weakref = do_QueryReferent(weakRefFactory);
|
||||||
NS_RELEASE(*aResult);
|
NS_RELEASE(*aResult);
|
||||||
NS_ADDREF(*aResult = weakref);
|
NS_IF_ADDREF(*aResult = weakref);
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче