Commit 02fbd587 authored by Damien Fouilleul's avatar Damien Fouilleul

wxwidgets: fix crash in playlist due to change in meta behaviour (all metas...

wxwidgets: fix crash in playlist due to change in meta behaviour (all metas used to retunr "" rather than NULL)
parent 5ccbc289
......@@ -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 );
......
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