diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/ppapi/ppapi_webplugin_impl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc index f99f319..80328ff 100644 --- a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc +++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc @@ -96,6 +96,11 @@ void WebPluginImpl::destroy() { NPObject* WebPluginImpl::scriptableObject() { scoped_refptr<ObjectVar> object( ObjectVar::FromPPVar(instance_->GetInstanceObject())); + // GetInstanceObject talked to the plugin which may have removed the instance + // from the DOM, in which case instance_ would be NULL now. + if (!instance_) + return NULL; + // If there's an InstanceObject, tell the Instance's MessageChannel to pass // any non-postMessage calls to it. if (object) { |