summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_webplugin_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/pepper_webplugin_impl.cc')
-rw-r--r--webkit/glue/plugins/pepper_webplugin_impl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/glue/plugins/pepper_webplugin_impl.cc b/webkit/glue/plugins/pepper_webplugin_impl.cc
index fa20107..990a885 100644
--- a/webkit/glue/plugins/pepper_webplugin_impl.cc
+++ b/webkit/glue/plugins/pepper_webplugin_impl.cc
@@ -59,8 +59,10 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) {
void WebPluginImpl::destroy() {
container_ = NULL;
- instance_->Delete();
- instance_ = NULL;
+ if (instance_) {
+ instance_->Delete();
+ instance_ = NULL;
+ }
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}