From: Damien Fouilleul Date: Wed, 5 Sep 2007 12:07:33 +0000 (+0000) Subject: wxwidgets: fix crash in playlist due to change in meta behaviour (all metas used... X-Git-Tag: 0.9.0-test0~5871 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=02fbd5872ba18c2d463edef59388b461bc31afdb;p=vlc wxwidgets: fix crash in playlist due to change in meta behaviour (all metas used to retunr "" rather than NULL) --- diff --git a/modules/gui/wxwidgets/dialogs/playlist.cpp b/modules/gui/wxwidgets/dialogs/playlist.cpp index 4649e20c5e..9b870df647 100644 --- a/modules/gui/wxwidgets/dialogs/playlist.cpp +++ b/modules/gui/wxwidgets/dialogs/playlist.cpp @@ -525,7 +525,7 @@ void Playlist::UpdateTreeItem( wxTreeItemId item ) wxU( " )" ) ); } - if( !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE ) + if( !psz_artist || !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE ) { msg = wxString( wxU( psz_name ) ) + duration; } @@ -534,7 +534,8 @@ void Playlist::UpdateTreeItem( wxTreeItemId item ) msg = wxString(wxU( psz_artist )) + wxT(" - ") + wxString(wxU(psz_name)) + duration; } - free( psz_artist ); + if( psz_artist ) + free( psz_artist ); free( psz_name ); treectrl->SetItemText( item , msg ); treectrl->SetItemImage( item, p_item->p_input->i_type );