]> git.sesse.net Git - vlc/commitdiff
Fix crash
authorClément Stenac <zorglub@videolan.org>
Sat, 16 Sep 2006 21:00:15 +0000 (21:00 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 16 Sep 2006 21:00:15 +0000 (21:00 +0000)
src/playlist/control.c
src/playlist/tree.c

index 521a9d26f4cc7de32a202ee1ea9e9da655d359c9..8bb86c6b3646cdf623498b2db180eaa4497a4393 100644 (file)
@@ -358,7 +358,7 @@ end:
     /* Start the real work */
     if( p_playlist->request.b_request )
     {
-        PL_DEBUG( "processing request node %s item %s skip %i",
+        PL_DEBUG( "processing request item %s node %s skip %i",
                         PLI_NAME( p_playlist->request.p_item ),
                         PLI_NAME( p_playlist->request.p_node ), i_skip );
         p_new = p_playlist->request.p_item;
index c10c372064c0c90ff717fd71121eea50b2d09074..9ff52e251aec97d4b0276cfa572c54a410cbf8bd 100644 (file)
@@ -663,10 +663,15 @@ playlist_item_t *GetPrevItem( playlist_t *p_playlist,
         {
             if( i-1 < 0 )
             {
-                /* Was already the first sibling. Look for uncles */
-                PL_DEBUG( "Current item is the first of the node,"
+               /* Was already the first sibling. Look for uncles */
+                PL_DEBUG( "current item is the first of its node,"
                           "looking for uncle from %s",
                           p_parent->p_input->psz_name );
+                if( p_parent == p_root )
+                {
+                    PL_DEBUG( "already at root" );
+                    return NULL;
+                }
                 return GetPrevUncle( p_playlist, p_item, p_root );
             }
             else