don't rebuild content if we're being closed. bug 53953 r=brendan,hyatt

This commit is contained in:
danm%netscape.com 2000-10-07 01:36:43 +00:00
parent 4656b9e277
commit c092d9eaae

View File

@ -480,8 +480,8 @@ nsBrowserInstance::ReinitializeContentVariables()
nsresult nsBrowserInstance::GetContentAreaDocShell(nsIDocShell** outDocShell)
{
nsCOMPtr<nsIDocShell> docShell(do_QueryReferent(mContentAreaDocShellWeak));
if (docShell) {
// the docshell still exists, but has it been destroyed?
if (!mIsClosed && docShell) {
// we're still alive and the docshell still exists. but has it been destroyed?
nsCOMPtr<nsIBaseWindow> hack = do_QueryInterface(docShell);
if (hack) {
nsCOMPtr<nsIWidget> parent;
@ -491,7 +491,7 @@ nsresult nsBrowserInstance::GetContentAreaDocShell(nsIDocShell** outDocShell)
docShell = 0;
}
}
if (!docShell)
if (!mIsClosed && !docShell)
ReinitializeContentVariables();
docShell = do_QueryReferent(mContentAreaDocShellWeak);