]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwidgets/playlist.cpp: Fixed segfault. Patch by Brian Robb (vascy...
authorGildas Bazin <gbazin@videolan.org>
Sat, 3 Sep 2005 22:55:56 +0000 (22:55 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 3 Sep 2005 22:55:56 +0000 (22:55 +0000)
modules/gui/wxwidgets/playlist.cpp

index f5c5b1de4d938027f62be28c1798419137c0b765..739a9a3899fcfaea1e7d7e3637eaf49796f6c7f8 100644 (file)
@@ -200,15 +200,13 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
 
     /* Initializations */
     p_intf = _p_intf;
+    pp_sds = NULL;
     i_update_counter = 0;
     i_sort_mode = MODE_NONE;
     b_need_update = VLC_FALSE;
     p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                                 FIND_ANYWHERE );
-    if( p_playlist == NULL )
-    {
-        return;
-    }
+    if( p_playlist == NULL ) return;
 
     SetIcon( *p_intf->p_sys->p_icon );
 
@@ -395,13 +393,9 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
 
 Playlist::~Playlist()
 {
-    if( pp_sds != NULL )
-        free( pp_sds );
+    if( pp_sds != NULL ) free( pp_sds );
 
-    if( p_playlist == NULL )
-    {
-        return;
-    }
+    if( p_playlist == NULL ) return;
 
     var_DelCallback( p_playlist, "item-change", ItemChanged, this );
     var_DelCallback( p_playlist, "playlist-current", PlaylistNext, this );