From: Ryan Norton Date: Thu, 3 Feb 2005 23:25:22 +0000 (+0000) Subject: dispose of old control for new one X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7115e540ece749b83928eded985ac79e8ccbe68a dispose of old control for new one git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/mediactrl.cpp b/src/mac/carbon/mediactrl.cpp index 497cb3cc81..716590fefd 100644 --- a/src/mac/carbon/mediactrl.cpp +++ b/src/mac/carbon/mediactrl.cpp @@ -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