Commit 2b35331a authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/playlist.cpp: fixed uninitialized memory access.

parent c2779ed4
...@@ -342,22 +342,13 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ): ...@@ -342,22 +342,13 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
wxTR_MULTIPLE | wxTR_EXTENDED ); wxTR_MULTIPLE | wxTR_EXTENDED );
/* Create image list */ /* Create image list */
wxImageList *p_images = new wxImageList( 16 , 16, TRUE );
wxImageList *p_images = new wxImageList( 16 , 16, TRUE); p_images->Add( wxIcon( type_unknown_xpm ) );
p_images->Add( wxIcon( type_disc_xpm ) );
wxIcon icons[10]; p_images->Add( wxIcon( type_directory_xpm ) );
icons[ ITEM_TYPE_UNKNOWN ] = wxIcon( type_unknown_xpm ); p_images->Add( wxIcon( type_playlist_xpm ) );
icons[ ITEM_TYPE_DISC ] = wxIcon( type_disc_xpm ); p_images->Add( wxIcon( type_net_xpm ) );
icons[ ITEM_TYPE_DIRECTORY ] = wxIcon( type_directory_xpm ); p_images->Add( wxIcon( type_card_xpm ) );
icons[ ITEM_TYPE_PLAYLIST ] = wxIcon( type_playlist_xpm );
icons[ ITEM_TYPE_NET ] = wxIcon( type_net_xpm );
icons[ ITEM_TYPE_CARD ] = wxIcon( type_card_xpm );
for( unsigned int i = 0; i< WXSIZEOF( icons ) ; i++ )
{
p_images->Add( wxIcon( icons[i] ));
}
treectrl->AssignImageList( p_images ); treectrl->AssignImageList( p_images );
treectrl->AddRoot( wxU(_("root" )), -1, -1, NULL ); treectrl->AddRoot( wxU(_("root" )), -1, -1, NULL );
......
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