]> git.saurik.com Git - wxWidgets.git/commitdiff
dispose of old control for new one
authorRyan Norton <wxprojects@comcast.net>
Thu, 3 Feb 2005 23:25:22 +0000 (23:25 +0000)
committerRyan Norton <wxprojects@comcast.net>
Thu, 3 Feb 2005 23:25:22 +0000 (23:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/mediactrl.cpp

index 497cb3cc81a901f121f37f9463bff5f0a5a24f67..716590fefd06638aa14939a110706d05a35b1299 100644 (file)
@@ -404,6 +404,11 @@ void wxQTMediaBackend::FinishLoad()
         Rect bounds = wxMacGetBoundsForControl(m_ctrl, 
                                                m_ctrl->GetPosition(),
                                                m_ctrl->GetSize());
+                                               
+    //Dispose of old control for new one
+    if (GetControlPeer(m_ctrl) && GetControlPeer(m_ctrl)->Ok() )
+        GetControlPeer(m_ctrl)->Dispose();
+        
     //Options-
     //kMovieControlOptionXXX
     //HideController - hide the movie controller