Commit 37a65fa6 authored by gbazin's avatar gbazin
Browse files

* modules/gui/wxwidgets/playlist.cpp: Fixed segfault. Patch by Brian Robb (vascy at hotmail).

parent cff0739e
...@@ -200,15 +200,13 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ): ...@@ -200,15 +200,13 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
/* Initializations */ /* Initializations */
p_intf = _p_intf; p_intf = _p_intf;
pp_sds = NULL;
i_update_counter = 0; i_update_counter = 0;
i_sort_mode = MODE_NONE; i_sort_mode = MODE_NONE;
b_need_update = VLC_FALSE; b_need_update = VLC_FALSE;
p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_playlist == NULL ) if( p_playlist == NULL ) return;
{
return;
}
SetIcon( *p_intf->p_sys->p_icon ); SetIcon( *p_intf->p_sys->p_icon );
...@@ -395,13 +393,9 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ): ...@@ -395,13 +393,9 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
Playlist::~Playlist() Playlist::~Playlist()
{ {
if( pp_sds != NULL ) if( pp_sds != NULL ) free( pp_sds );
free( pp_sds );
if( p_playlist == NULL ) if( p_playlist == NULL ) return;
{
return;
}
var_DelCallback( p_playlist, "item-change", ItemChanged, this ); var_DelCallback( p_playlist, "item-change", ItemChanged, this );
var_DelCallback( p_playlist, "playlist-current", PlaylistNext, this ); var_DelCallback( p_playlist, "playlist-current", PlaylistNext, this );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment