[vlc-commits] commit: skins2: better cleanup for button and checkbox (Erwan Tulou )

git at videolan.org git at videolan.org
Sun Jan 16 23:05:50 CET 2011


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Jan 13 19:28:43 2011 +0100| [5154442579f514dc4ff1484e6ca90ab0e1779cc9] | committer: Erwan Tulou 

skins2: better cleanup for button and checkbox

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5154442579f514dc4ff1484e6ca90ab0e1779cc9
---

 modules/gui/skins2/controls/ctrl_button.cpp   |    5 +++++
 modules/gui/skins2/controls/ctrl_checkbox.cpp |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/modules/gui/skins2/controls/ctrl_button.cpp b/modules/gui/skins2/controls/ctrl_button.cpp
index b89a26a..9aca8d8 100644
--- a/modules/gui/skins2/controls/ctrl_button.cpp
+++ b/modules/gui/skins2/controls/ctrl_button.cpp
@@ -79,6 +79,11 @@ CtrlButton::CtrlButton( intf_thread_t *pIntf, const GenericBitmap &rBmpUp,
 
 CtrlButton::~CtrlButton()
 {
+    if( m_pImg )
+    {
+        m_pImg->stopAnim();
+        m_pImg->delObserver( this );
+    }
 }
 
 void CtrlButton::setLayout( GenericLayout *pLayout,
diff --git a/modules/gui/skins2/controls/ctrl_checkbox.cpp b/modules/gui/skins2/controls/ctrl_checkbox.cpp
index 428c339..2fff0d4 100644
--- a/modules/gui/skins2/controls/ctrl_checkbox.cpp
+++ b/modules/gui/skins2/controls/ctrl_checkbox.cpp
@@ -111,6 +111,11 @@ CtrlCheckbox::CtrlCheckbox( intf_thread_t *pIntf,
 
 CtrlCheckbox::~CtrlCheckbox()
 {
+    if( m_pImgCurrent )
+    {
+        m_pImgCurrent->stopAnim();
+        m_pImgCurrent->delObserver( this );
+    }
     m_rVariable.delObserver( this );
 }
 



More information about the vlc-commits mailing list