Bug 239572: nullcheck before calling CallQueryInterface
r/sr=jst a=chofmann git-svn-id: svn://10.0.0.236/trunk@194884 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -246,7 +246,9 @@ GetDocumentFromScriptContext(nsIScriptContext *aScriptContext)
|
||||
if (window) {
|
||||
nsCOMPtr<nsIDOMDocument> domdoc;
|
||||
window->GetDocument(getter_AddRefs(domdoc));
|
||||
(void) CallQueryInterface(domdoc, &doc);
|
||||
//if (domdoc) {
|
||||
CallQueryInterface(domdoc, &doc);
|
||||
//}
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user