]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/controls/ctrl_list.cpp
That's safe to delete NULL.
[vlc] / modules / gui / skins2 / controls / ctrl_list.cpp
index 0817451d14a7ab539075100217d0816340d2328c..c0dc427ef23df4080a1b56fcf5d4a9e54f68a19a 100644 (file)
@@ -65,21 +65,18 @@ CtrlList::~CtrlList()
 {
     m_rList.getPositionVar().delObserver( this );
     m_rList.delObserver( this );
-    if( m_pImage )
-    {
-        delete m_pImage;
-    }
+    delete m_pImage;
 }
 
 
-void CtrlList::onUpdate( Subject<VarList, void*> &rList, void *arg  )
+void CtrlList::onUpdate( Subject<VarList> &rList, void *arg  )
 {
     autoScroll();
     m_pLastSelected = NULL;
 }
 
 
-void CtrlList::onUpdate( Subject<VarPercent, void*> &rPercent, void *arg  )
+void CtrlList::onUpdate( Subject<VarPercent> &rPercent, void *arg  )
 {
     // Get the size of the control
     const Position *pPos = getPosition();
@@ -411,10 +408,7 @@ void CtrlList::autoScroll()
 
 void CtrlList::makeImage()
 {
-    if( m_pImage )
-    {
-        delete m_pImage;
-    }
+    delete m_pImage;
 
     // Get the size of the control
     const Position *pPos = getPosition();