From 7a4bef2d5470b2c5ef52f327f1fbc90adb0acd9c Mon Sep 17 00:00:00 2001 From: "danm%netscape.com" Date: Fri, 6 Oct 2000 00:22:56 +0000 Subject: [PATCH] don't set status in SetNewDocument if window is partially destroyed. bug 49615 r=jst,waterson --- dom/src/base/nsGlobalWindow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index 2400cb2f8505..b4ac822bcccc 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -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 doc(do_QueryInterface(mDocument));