[vlc-devel] [PATCH] playlist: fix missing NULL test

Steve Lhomme robux4 at videolabs.io
Thu Nov 17 08:59:10 CET 2016


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

diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index 8bc560f..2839aa1 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -69,7 +69,8 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
     p_new_input = input_item_NewExt( NULL, psz_name, -1, ITEM_TYPE_NODE,
                                      ITEM_NET_UNKNOWN );
     p_item = playlist_ItemNewFromInput( p_playlist, p_new_input );
-    vlc_gc_decref( p_new_input );
+    if( p_new_input )
+        vlc_gc_decref( p_new_input );
 
     if( p_item == NULL )  return NULL;
     p_item->i_children = 0;
-- 
2.10.1



More information about the vlc-devel mailing list