[vlc-commits] playlist: fix flawed logic

Rémi Denis-Courmont git at videolan.org
Thu Nov 17 18:13:55 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Nov 17 19:13:33 2016 +0200| [17f268596c0089d90f7341a6127e64e66ab67c86] | committer: Rémi Denis-Courmont

playlist: fix flawed logic

Regression from cc67adbfdcf3d084a8b2860e58dea0d711f24010.

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

 src/playlist/tree.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index ad41bd2..8bc560f 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -99,8 +99,7 @@ void playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
 
     /* Delete the children */
     for( int i = p_root->i_children - 1 ; i >= 0; i-- )
-        if( p_root->pp_children[i]->i_children >= 0 )
-            playlist_NodeDelete( p_playlist, p_root->pp_children[i], b_force );
+        playlist_NodeDelete( p_playlist, p_root->pp_children[i], b_force );
 
     /* Delete the node */
     if( p_root->i_flags & PLAYLIST_RO_FLAG && !b_force )



More information about the vlc-commits mailing list