Bug #217459
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user