don't crash when there is bad XML

git-svn-id: svn://10.0.0.236/trunk@67672 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alecf%netscape.com
2000-04-30 19:21:20 +00:00
parent 8922af96b4
commit fd6f01043d
2 changed files with 14 additions and 10 deletions

View File

@@ -948,12 +948,14 @@ nsXBLBinding::GetBaseTag(nsIAtom** aResult)
if (xmlContent) {
xmlContent->GetContainingNameSpace(*getter_AddRefs(nameSpace));
nsCOMPtr<nsINameSpace> tagSpace;
nameSpace->FindNameSpace(prefixAtom, *getter_AddRefs(tagSpace));
if (tagSpace) {
// Score! Return the tag.
if (nameSpace) {
nsCOMPtr<nsINameSpace> tagSpace;
nameSpace->FindNameSpace(prefixAtom, *getter_AddRefs(tagSpace));
if (tagSpace) {
// Score! Return the tag.
// XXX We should really return the namespace as well.
*aResult = NS_NewAtom(extends); // The addref happens here
*aResult = NS_NewAtom(extends); // The addref happens here
}
}
}
}

View File

@@ -948,12 +948,14 @@ nsXBLBinding::GetBaseTag(nsIAtom** aResult)
if (xmlContent) {
xmlContent->GetContainingNameSpace(*getter_AddRefs(nameSpace));
nsCOMPtr<nsINameSpace> tagSpace;
nameSpace->FindNameSpace(prefixAtom, *getter_AddRefs(tagSpace));
if (tagSpace) {
// Score! Return the tag.
if (nameSpace) {
nsCOMPtr<nsINameSpace> tagSpace;
nameSpace->FindNameSpace(prefixAtom, *getter_AddRefs(tagSpace));
if (tagSpace) {
// Score! Return the tag.
// XXX We should really return the namespace as well.
*aResult = NS_NewAtom(extends); // The addref happens here
*aResult = NS_NewAtom(extends); // The addref happens here
}
}
}
}