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

r=jst,rpotts, sr=rpotts
This commit is contained in:
chak@netscape.com
2001-05-14 14:53:03 +00:00
parent c64ab9343c
commit cb42a1cd0d

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;