[vlc-devel] commit: playlist: Fix a warning about an unitialized ptr. (Pierre d' Herbemont )
git version control
git at videolan.org
Sun Jul 13 11:30:57 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Jul 13 11:02:30 2008 +0200| [71c06757b220a261d02835ec41466e2c8447ba41]
playlist: Fix a warning about an unitialized ptr.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=71c06757b220a261d02835ec41466e2c8447ba41
---
src/playlist/tree.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index 35eb33b..3b583ee 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -59,7 +59,7 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
playlist_item_t *p_parent, int i_flags,
input_item_t *p_input )
{
- input_item_t *p_new_input;
+ input_item_t *p_new_input = NULL;
playlist_item_t *p_item;
if( !psz_name ) psz_name = _("Undefined");
@@ -69,7 +69,7 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
psz_name, 0, NULL, -1, ITEM_TYPE_NODE );
p_item = playlist_ItemNewFromInput( VLC_OBJECT(p_playlist),
p_input ? p_input : p_new_input );
- if( !p_input )
+ if( p_new_input )
vlc_gc_decref( p_new_input );
if( p_item == NULL ) return NULL;
More information about the vlc-devel
mailing list