Bug 158202 crash opening venkman and closing navigator [@nsXULElement::GetOwnerDocument]

patch by sicking@bigfoot.com r=bz sr=jst a=scc checkin authorized by scc
This commit is contained in:
timeless%mac.com 2002-07-19 17:03:03 +00:00
Родитель f0437b1093
Коммит 975a3e12c6
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -921,13 +921,15 @@ NS_IMETHODIMP
nsXULElement::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
{
if (mDocument) {
return mDocument->QueryInterface(NS_GET_IID(nsIDOMDocument), (void**) aOwnerDocument);
return CallQueryInterface(mDocument, aOwnerDocument);
}
else {
nsCOMPtr<nsIDocument> doc;
NodeInfo()->GetDocument(*getter_AddRefs(doc));
nsCOMPtr<nsIDocument> doc;
NodeInfo()->GetDocument(*getter_AddRefs(doc));
if (doc) {
return CallQueryInterface(doc, aOwnerDocument);
}
*aOwnerDocument = nsnull;
return NS_OK;
}