]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/dialogs.cpp
cosmetic: remove nullity test on free() and delete
[vlc] / modules / gui / skins2 / src / dialogs.cpp
index ee80de2a5ae274dab159c99cbf3dfeb0da077b47..e267295c6bee88d3482c5391ae40039e9cd3ef97 100644 (file)
@@ -120,7 +120,7 @@ Dialogs::~Dialogs()
     }
 
     /* Unregister callbacks */
-    var_DelCallback( getIntf()->p_sys->p_playlist, "intf-popupmenu",
+    var_DelCallback( getIntf()->p_libvlc, "intf-popupmenu",
                      PopupMenuCB, this );
 }
 
@@ -147,11 +147,8 @@ Dialogs *Dialogs::instance( intf_thread_t *pIntf )
 
 void Dialogs::destroy( intf_thread_t *pIntf )
 {
-    if( pIntf->p_sys->p_dialogs )
-    {
-        delete pIntf->p_sys->p_dialogs;
-        pIntf->p_sys->p_dialogs = NULL;
-    }
+    delete pIntf->p_sys->p_dialogs;
+    pIntf->p_sys->p_dialogs = NULL;
 }
 
 
@@ -183,7 +180,7 @@ bool Dialogs::init()
     }
 
     /* Register callback for the intf-popupmenu variable */
-    var_AddCallback( getIntf()->p_sys->p_playlist, "intf-popupmenu",
+    var_AddCallback( getIntf()->p_libvlc, "intf-popupmenu",
                      PopupMenuCB, this );
 
     return true;