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 620a921..9691bed 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.
 2007-07-01  Rob Buis  <buis@kde.org>
 
         Reviewed by Darin.
index d69a9a9..9b946e6 100644 (file)
@@ -1157,7 +1157,9 @@ PluginViewWin::~PluginViewWin()
         DestroyWindow(m_window);
 
     m_parentFrame->cleanupScriptObjectsForPlugin(this);
         DestroyWindow(m_window);
 
     m_parentFrame->cleanupScriptObjectsForPlugin(this);
-    m_plugin->unload();
+
+    if (m_plugin)
+        m_plugin->unload();
 }
 
 void PluginViewWin::disconnectStream(PluginStreamWin* stream)
 }
 
 void PluginViewWin::disconnectStream(PluginStreamWin* stream)