Null-check for unreproducable topcrash. b=267804 r+sr=jst

git-svn-id: svn://10.0.0.236/trunk@165057 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2004-11-06 07:59:46 +00:00
parent d17e10572f
commit f6296b1cc9

View File

@@ -3342,6 +3342,13 @@ nsDocShell::GetVisibility(PRBool * aVisibility)
nsCOMPtr<nsIPresShell> 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");