]> git.sesse.net Git - vlc/commitdiff
ncurses: fix a segfault when launching the interface without any item in the playlist.
authorRémi Duraffort <ivoire@videolan.org>
Sat, 14 Feb 2009 10:06:17 +0000 (11:06 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 15 Feb 2009 16:04:45 +0000 (17:04 +0100)
modules/gui/ncurses.c

index b11542fbcc937140172ccef89c4dbaf32a6ba64f..569eac8460223620fa3673b074fc982167cbd0bb 100644 (file)
@@ -2148,8 +2148,8 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
             playlist_item_t *p_node = p_sys->p_node;
             int c = ' ';
             if( ( p_node && p_item->p_input == p_node->p_input ) ||
-                        ( !p_node && p_item->p_input ==
-                        playlist_CurrentPlayingItem(p_playlist)->p_input ) )
+                        ( !p_node && playlist_CurrentInput( p_playlist ) &&
+                          p_item->p_input == playlist_CurrentPlayingItem(p_playlist)->p_input ) )
                 c = '*';
             else if( p_item == p_node || ( p_item != p_node &&
                         PlaylistIsPlaying( p_intf, p_item ) ) )