Fix for 64270 - crash on window.close when another window is referenced

r=jst,rpotts, sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@94891 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
chak%netscape.com
2001-05-14 14:53:03 +00:00
parent 6b82fe01dc
commit 8c6f66adac

View File

@@ -232,8 +232,10 @@ nsWebShell::FireUnloadForChildren()
PRInt32 i, n = mChildren.Count();
for (i = 0; i < n; i++) {
nsIDocShell* shell = (nsIDocShell*) mChildren.ElementAt(i);
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(shell));
rv = webShell->FireUnloadEvent();
if(shell) {
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(shell));
rv = webShell->FireUnloadEvent();
}
}
return rv;