don't set status in SetNewDocument if window is partially destroyed. bug 49615 r=jst,waterson

This commit is contained in:
danm%netscape.com 2000-10-06 00:22:56 +00:00
parent c8ba15ed54
commit 7a4bef2d54

View File

@ -305,8 +305,14 @@ NS_IMETHODIMP GlobalWindowImpl::SetNewDocument(nsIDOMDocument* aDocument)
return NS_OK;
}
SetStatus(nsString());
SetDefaultStatus(nsString());
/* No mDocShell means we've already been partially closed down.
When that happens, setting status isn't a big requirement,
so don't. (Doesn't happen under normal circumstances, but
bug 49615 describes a case.) */
if (mDocShell) {
SetStatus(nsString());
SetDefaultStatus(nsString());
}
if (mDocument) {
nsCOMPtr<nsIDocument> doc(do_QueryInterface(mDocument));