Bug 5695. Check return code from GetScriptGlobalObject() before trying to deref pointer. r=nisheeth,a=chofmann
git-svn-id: svn://10.0.0.236/trunk@29841 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -296,8 +296,8 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent,
|
||||
if (nsnull != owner) {
|
||||
mDocument->SetScriptContextOwner(owner);
|
||||
nsIScriptGlobalObject* global;
|
||||
owner->GetScriptGlobalObject(&global);
|
||||
if (nsnull != global) {
|
||||
rv = owner->GetScriptGlobalObject(&global);
|
||||
if (NS_SUCCEEDED(rv) && (nsnull != global)) {
|
||||
nsIDOMDocument *domdoc = nsnull;
|
||||
mDocument->QueryInterface(kIDOMDocumentIID,
|
||||
(void**) &domdoc);
|
||||
|
||||
Reference in New Issue
Block a user