From d7144f007db47a5d5c9667ca6efe280958062955 Mon Sep 17 00:00:00 2001 From: "chak%netscape.com" Date: Mon, 14 May 2001 14:53:03 +0000 Subject: [PATCH] Fix for 64270 - crash on window.close when another window is referenced r=jst,rpotts, sr=rpotts --- docshell/base/nsWebShell.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index f278d4a38ec..c2b91b4a1f6 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -232,8 +232,10 @@ nsWebShell::FireUnloadForChildren() PRInt32 i, n = mChildren.Count(); for (i = 0; i < n; i++) { nsIDocShell* shell = (nsIDocShell*) mChildren.ElementAt(i); - nsCOMPtr webShell(do_QueryInterface(shell)); - rv = webShell->FireUnloadEvent(); + if(shell) { + nsCOMPtr webShell(do_QueryInterface(shell)); + rv = webShell->FireUnloadEvent(); + } } return rv;