Fix a crash in ~PluginViewWin()
[WebKit-https.git] / WebCore / plugins / win / PluginViewWin.cpp
index d69a9a92424ab01df3ac83f94e7db36c0d4231ac..9b946e6ab4c205348bc7b6c1c1121efb8e2aee41 100644 (file)
@@ -1157,7 +1157,9 @@ PluginViewWin::~PluginViewWin()
         DestroyWindow(m_window);
 
     m_parentFrame->cleanupScriptObjectsForPlugin(this);
-    m_plugin->unload();
+
+    if (m_plugin)
+        m_plugin->unload();
 }
 
 void PluginViewWin::disconnectStream(PluginStreamWin* stream)