diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 170f2896922..00eed7c470d 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -856,15 +856,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 {