fix for 58477 (null check), r=jag, sr=hyatt

This commit is contained in:
dr%netscape.com 2001-03-01 01:35:12 +00:00
parent 9d01803642
commit 17ae0a3cc2

View File

@ -131,6 +131,7 @@ nsXBLSpecialDocInfo::GetHandlers(nsIXBLDocumentInfo* aInfo,
nsCOMPtr<nsIDocument> doc;
aInfo->GetDocument(getter_AddRefs(doc));
nsCOMPtr<nsIContent> root = getter_AddRefs(doc->GetRootContent());
if (root) { // no root, no handlers. don't crash please.
PRInt32 childCount;
root->ChildCount(childCount);
for (PRInt32 i = 0; i < childCount; i++) {
@ -145,6 +146,7 @@ nsXBLSpecialDocInfo::GetHandlers(nsIXBLDocumentInfo* aInfo,
}
}
}
}
if (binding) {
nsCOMPtr<nsIXBLPrototypeHandler> dummy;