diff --git a/xpfe/appshell/src/nsWebShellWindow.cpp b/xpfe/appshell/src/nsWebShellWindow.cpp index e3733e319e56..c0553fe26939 100644 --- a/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/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) {