]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/controls/ctrl_generic.cpp
That's safe to delete NULL.
[vlc] / modules / gui / skins2 / controls / ctrl_generic.cpp
index 2f9c05ccab9fdaf6ab79347ee547134f52c78e78..77e0e8e90180022ae60d0a005dbae024076871b6 100644 (file)
@@ -5,7 +5,7 @@
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
- *          Olivier Teulière <ipkiss@via.ecp.fr>
+ *          Olivier Teulière <ipkiss@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -45,10 +45,7 @@ CtrlGeneric::CtrlGeneric( intf_thread_t *pIntf, const UString &rHelp,
 
 CtrlGeneric::~CtrlGeneric()
 {
-    if( m_pPosition )
-    {
-        delete m_pPosition;
-    }
+    delete m_pPosition;
     if( m_pVisible )
     {
         m_pVisible->delObserver( this );
@@ -60,10 +57,7 @@ void CtrlGeneric::setLayout( GenericLayout *pLayout,
                              const Position &rPosition )
 {
     m_pLayout = pLayout;
-    if( m_pPosition )
-    {
-        delete m_pPosition;
-    }
+    delete m_pPosition;
     m_pPosition = new Position( rPosition );
     onPositionChange();
 }
@@ -155,7 +149,7 @@ bool CtrlGeneric::isVisible() const
 }
 
 
-void CtrlGeneric::onUpdate( Subject<VarBool, void*> &rVariable, void *arg  )
+void CtrlGeneric::onUpdate( Subject<VarBool> &rVariable, void *arg  )
 {
     // Is it the visibility variable ?
     if( &rVariable == m_pVisible )