From f0330c4efe03997903d5bc37f01cbafef96bf998 Mon Sep 17 00:00:00 2001 From: "saari@netscape.com" Date: Sun, 4 Jul 1999 02:43:58 +0000 Subject: [PATCH] fix bug 9032, check for null crash --- xpfe/appshell/src/nsWebShellWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) 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) {