From 210b6b336664384f2550fca3e6b8386f98881d8c Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Tue, 22 Feb 2005 13:13:29 +0000 Subject: [PATCH] * modules/gui/wxwindows/playlist.cpp: sanity check to avoid crashes (doesn't explain why the check is triggered though). --- modules/gui/wxwindows/playlist.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/gui/wxwindows/playlist.cpp b/modules/gui/wxwindows/playlist.cpp index 575a64890e..2bef3a93f0 100644 --- a/modules/gui/wxwindows/playlist.cpp +++ b/modules/gui/wxwindows/playlist.cpp @@ -497,13 +497,11 @@ void Playlist::UpdateTreeItem( playlist_t *p_playlist, wxTreeItemId item ) { if( ! item.IsOk() ) return; - playlist_item_t *p_item = - ((PlaylistItem *)treectrl->GetItemData( item ))->p_item; + wxTreeItemData *p_data = treectrl->GetItemData( item ); + if( !p_data ) return; - if( !p_item ) - { - return; - } + playlist_item_t *p_item = ((PlaylistItem *)p_data)->p_item; + if( !p_item ) return; wxString msg; wxString duration = wxU( "" );