playlist: fix a segfault
authorRafaël Carré <funman@videolan.org>
Wed, 3 Oct 2007 22:21:00 +0000 (22:21 +0000)
committerRafaël Carré <funman@videolan.org>
Wed, 3 Oct 2007 22:21:00 +0000 (22:21 +0000)
src/playlist/tree.c

index 3f9b426..68b2228 100644 (file)
@@ -533,7 +533,7 @@ playlist_item_t *GetNextUncle( playlist_t *p_playlist, playlist_item_t *p_item,
     if( p_parent != NULL )
     {
         p_grandparent = p_parent->p_parent;
-        while( 1 )
+        while( p_grandparent )
         {
             int i;
             for( i = 0 ; i< p_grandparent->i_children ; i++ )