diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index b18b7a86384..fab4fbae155 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -3342,6 +3342,13 @@ nsDocShell::GetVisibility(PRBool * aVisibility) nsCOMPtr pPresShell; parentDS->GetPresShell(getter_AddRefs(pPresShell)); + // Null-check for crash in bug 267804 + if (!pPresShell) { + NS_NOTREACHED("docshell has null pres shell"); + *aVisibility = PR_FALSE; + return NS_OK; + } + nsIContent *shellContent = pPresShell->GetDocument()->FindContentForSubDocument(presShell->GetDocument()); NS_ASSERTION(shellContent, "subshell not in the map");