[vlc-devel] commit: ncurses: fix a segfault when launching the interface without any item in the playlist . ( Rémi Duraffort )

git version control git at videolan.org
Sun Feb 15 17:10:39 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Feb 14 11:06:17 2009 +0100| [85fb567c408b390422ab72014131ad6ea7754c15] | committer: Rémi Duraffort 

ncurses: fix a segfault when launching the interface without any item in the playlist.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=85fb567c408b390422ab72014131ad6ea7754c15
---

 modules/gui/ncurses.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index b11542f..569eac8 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -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 ) ) )




More information about the vlc-devel mailing list