mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 16:22:53 +00:00
Bug 5695. Check return code from GetScriptGlobalObject() before trying to deref pointer. r=nisheeth,a=chofmann
This commit is contained in:
parent
19ca513966
commit
79cb20e767
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user