Fix a crash in ~PluginViewWin()
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2007 00:44:15 +0000 (00:44 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2007 00:44:15 +0000 (00:44 +0000)
This crash was introduced in r23827.

Reviewed by Anders.

Fixes dom/html/level2/html/HTMLAnchorElement01.html

* plugins/win/PluginViewWin.cpp:
(WebCore::PluginViewWin::~PluginViewWin): Allow m_plugin to be null.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23920 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/plugins/win/PluginViewWin.cpp

index 620a92177db44b70219f97a66cfa57cd48ff4acd..9691bed7b902d73ba0b67282140d9d2c8d513789 100644 (file)
@@ -1,3 +1,16 @@
+2007-07-01  Adam Roben  <aroben@apple.com>
+
+        Fix a crash in ~PluginViewWin()
+
+        This crash was introduced in r23827.
+
+        Reviewed by Anders.
+
+        Fixes dom/html/level2/html/HTMLAnchorElement01.html
+
+        * plugins/win/PluginViewWin.cpp:
+        (WebCore::PluginViewWin::~PluginViewWin): Allow m_plugin to be null.
+
 2007-07-01  Rob Buis  <buis@kde.org>
 
         Reviewed by Darin.
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)