diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-05 01:53:54 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-05 01:53:54 +0000 |
commit | 2ca174c7526fbd544234e59d24d38c7d5422d3cf (patch) | |
tree | 3d7254900428ff2f7ff53cb3b1e7e56af8852bd9 /webkit/glue/webplugin_impl.cc | |
parent | 7bfffc777ba36aa97957441ed8d60d6963beadb5 (diff) | |
download | chromium_src-2ca174c7526fbd544234e59d24d38c7d5422d3cf.zip chromium_src-2ca174c7526fbd544234e59d24d38c7d5422d3cf.tar.gz chromium_src-2ca174c7526fbd544234e59d24d38c7d5422d3cf.tar.bz2 |
Check for a NULL WebPluginDelegate pointer in WebPluginImpl::TearDownPluginInstance.
This function gets called during plugin destruction and during plugin reinitialization. It looks like this crash occurs when the reinitialization fails and the plugin widget
is being destroyed.
This fixes http://code.google.com/p/chromium/issues/detail?id=7405
Review URL: http://codereview.chromium.org/21069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9206 0039d316-1c4b-4281-b951-d872f2087c98
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. |