[vlc-devel] [PATCH 1/2] Fix segfault in preparser

Francois Cartegnie fcvlcdev at free.fr
Thu Apr 15 21:57:27 CEST 2010


---
 src/playlist/preparser.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/playlist/preparser.c b/src/playlist/preparser.c
index 9dbc15d..91b341d 100644
--- a/src/playlist/preparser.c
+++ b/src/playlist/preparser.c
@@ -153,6 +153,7 @@ static void Art( playlist_preparser_t *p_preparser, input_item_t *p_item )
 {
     playlist_t *p_playlist = p_preparser->p_playlist;
     playlist_fetcher_t *p_fetcher = p_preparser->p_fetcher;
+    const char const *psz_undefined = "NULL";
 
     bool b_fetch = false;
     /* If we haven't retrieved enough meta, add to secondary queue
@@ -170,13 +171,15 @@ static void Art( playlist_preparser_t *p_preparser, input_item_t *p_item )
         if( p_preparser->i_art_policy == ALBUM_ART_ALL &&
             ( !psz_arturl || strncmp( psz_arturl, "file://", 7 ) ) )
         {
-            msg_Dbg( p_playlist, "meta ok for %s, need to fetch art", psz_name );
+            msg_Dbg( p_playlist, "meta ok for %s, need to fetch art",
+                     psz_name ? psz_name : psz_undefined );
             b_fetch = true;
         }
         else
         {
             msg_Dbg( p_playlist, "no fetch required for %s (art currently %s)",
-                     psz_name, psz_arturl );
+                     psz_name ? psz_name : psz_undefined,
+                     psz_arturl ? psz_arturl : psz_undefined );
         }
     }
     vlc_mutex_unlock( &p_item->lock );
-- 
1.6.4.4




More information about the vlc-devel mailing list