Commit 5db73af5 authored by Rafaël Carré's avatar Rafaël Carré

fix [22632]: check psz_arturl before using it

parent f4af45cf
...@@ -165,7 +165,7 @@ int input_ArtFind( playlist_t *p_playlist, input_item_t *p_item ) ...@@ -165,7 +165,7 @@ int input_ArtFind( playlist_t *p_playlist, input_item_t *p_item )
input_FindArtInCache( p_playlist, p_item ); input_FindArtInCache( p_playlist, p_item );
char *psz_arturl = input_item_GetArtURL( p_item ); char *psz_arturl = input_item_GetArtURL( p_item );
if( !strncmp( psz_arturl, "file://", strlen( "file://" ) ) ) if( psz_arturl && !strncmp( psz_arturl, "file://", strlen( "file://" ) ) )
{ {
free( psz_arturl ); free( psz_arturl );
return 0; /* Art is in cache, no need to go further */ return 0; /* Art is in cache, no need to go further */
......
...@@ -534,7 +534,8 @@ void playlist_PreparseLoop( playlist_preparse_t *p_obj ) ...@@ -534,7 +534,8 @@ void playlist_PreparseLoop( playlist_preparse_t *p_obj )
} }
/* We already have all needed meta, but we need art right now */ /* We already have all needed meta, but we need art right now */
else if( p_playlist->p_fetcher->i_art_policy == ALBUM_ART_ALL && else if( p_playlist->p_fetcher->i_art_policy == ALBUM_ART_ALL &&
strncmp( psz_arturl, "file://", strlen("file://") ) ) !psz_arturl ? 1 :
strncmp( psz_arturl, "file://", strlen("file://") ) )
{ {
preparse_item_t p; preparse_item_t p;
PL_DEBUG("meta ok for %s, need to fetch art", psz_name ); PL_DEBUG("meta ok for %s, need to fetch art", psz_name );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment