From c9465eb3485f99282e75db14da71f4eb871a09e2 Mon Sep 17 00:00:00 2001 From: "rpotts%netscape.com" Date: Tue, 18 Sep 2001 04:29:40 +0000 Subject: [PATCH] bug #98469 (r=pavlov@netscape.com, sr=jst@netscape.com, a=pdt). The _content window target does not always exist... git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103075 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 6264e435d77..870ef1b778d 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -855,15 +855,19 @@ nsresult nsDocShell::FindTarget(const PRUnichar *aWindowTarget, } else if(name.EqualsIgnoreCase("_content")) { - if (mTreeOwner) + if (mTreeOwner) { mTreeOwner->FindItemWithName(name.get(), nsnull, getter_AddRefs(treeItem)); - else - { + } else { NS_ERROR("Someone isn't setting up the tree owner. " "You might like to try that. " "Things will.....you know, work."); } + // _content should always exist. If the nsIDocShellTreeOwner did + // not find one, then create one... + if (!treeItem) { + mustMakeNewWindow = PR_TRUE; + } } else {