r/sr=darin, a=asa
Null check for docshell


git-svn-id: svn://10.0.0.236/trunk@146581 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2003-09-05 20:35:04 +00:00
parent 3e02507cd1
commit fb75f1cb86

View File

@@ -50,8 +50,10 @@ nsWebBrowserContentPolicy::ShouldLoad(PRInt32 contentType,
return NS_OK;
nsCOMPtr<nsIDocShell> shell;
if (NS_FAILED(scriptGlobal->GetDocShell(getter_AddRefs(shell))))
return NS_OK;
scriptGlobal->GetDocShell(getter_AddRefs(shell));
/* We're going to dereference shell, so make sure it isn't null */
if (!shell)
return NS_OK;
switch (contentType) {
case nsIContentPolicy::OBJECT: