changeset 33873:983ffb8be5bd

Check directory history entry prior to its usage. This fixes a segmentation fault with the playlist menu.
author ib
date Tue, 09 Aug 2011 21:32:09 +0000
parents d7bc4bcc3523
children e1bec41397bb
files gui/ui/gtk/playlist.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/gtk/playlist.c	Tue Aug 09 20:14:30 2011 +0000
+++ b/gui/ui/gtk/playlist.c	Tue Aug 09 21:32:09 2011 +0000
@@ -489,7 +489,7 @@
   gtk_ctree_expand( GTK_CTREE( CTDirTree ),parent );
   gtk_widget_show( CTDirTree );
 
-  old_path = g_filename_from_utf8( fsHistory[0], -1, NULL, NULL, NULL );
+  if ( fsHistory[0] ) old_path = g_filename_from_utf8( fsHistory[0], -1, NULL, NULL, NULL );
 
   gtk_clist_set_column_widget( GTK_CLIST( CTDirTree ),0,
     AddLabel( MSGTR_PLAYLIST_DirectoryTree,NULL ) );