diff options
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r-- | webkit/glue/webplugin_impl.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc index 2ebe5f5..8c7b199 100644 --- a/webkit/glue/webplugin_impl.cc +++ b/webkit/glue/webplugin_impl.cc @@ -1375,10 +1375,12 @@ void WebPluginImpl::TearDownPluginInstance( frame()->script()->cleanupScriptObjectsForPlugin(widget_); } - // Call PluginDestroyed() first to prevent the plugin from calling us back - // in the middle of tearing down the render tree. - delegate_->PluginDestroyed(); - delegate_ = NULL; + if (delegate_) { + // Call PluginDestroyed() first to prevent the plugin from calling us back + // in the middle of tearing down the render tree. + delegate_->PluginDestroyed(); + delegate_ = NULL; + } // Cancel any pending requests because otherwise this deleted object will // be called by the ResourceDispatcher. |