diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index e3733e319e5..c0553fe2693 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -1895,6 +1895,9 @@ nsWebShellWindow::HandleUnknownContentType(nsIDocumentLoader* loader, //---------------------------------------- nsCOMPtr nsWebShellWindow::FindNamedDOMNode(const nsString &aName, nsIDOMNode * aParent, PRInt32 & aCount, PRInt32 aEndCount) { + if(!aParent) + return nsnull; + nsCOMPtr node; aParent->GetFirstChild(getter_AddRefs(node)); while (node) {