Commit 0666b4e2 authored by Rafaël Carré's avatar Rafaël Carré

Fixes segfault introduced in [18810]

parent f7b46de2
...@@ -84,8 +84,9 @@ static int FindMeta( vlc_object_t *p_this ) ...@@ -84,8 +84,9 @@ static int FindMeta( vlc_object_t *p_this )
*psz_dir = '\0'; *psz_dir = '\0';
} }
if( !strncmp( psz_dir, "file://", 7 ) ) char *psz_path = psz_dir;
psz_dir += 7; if( !strncmp( psz_path, "file://", 7 ) )
psz_path += 7;
for( i = 0; b_have_art == VLC_FALSE && i < 3; i++ ) for( i = 0; b_have_art == VLC_FALSE && i < 3; i++ )
{ {
...@@ -94,19 +95,19 @@ static int FindMeta( vlc_object_t *p_this ) ...@@ -94,19 +95,19 @@ static int FindMeta( vlc_object_t *p_this )
case 0: case 0:
/* Windows Folder.jpg */ /* Windows Folder.jpg */
snprintf( psz_filename, MAX_PATH, snprintf( psz_filename, MAX_PATH,
"file://%sFolder.jpg", psz_dir ); "file://%sFolder.jpg", psz_path );
break; break;
case 1: case 1:
/* Windows AlbumArtSmall.jpg == small version of Folder.jpg */ /* Windows AlbumArtSmall.jpg == small version of Folder.jpg */
snprintf( psz_filename, MAX_PATH, snprintf( psz_filename, MAX_PATH,
"file://%sAlbumArtSmall.jpg", psz_dir ); "file://%sAlbumArtSmall.jpg", psz_path );
break; break;
case 2: case 2:
/* KDE (?) .folder.png */ /* KDE (?) .folder.png */
snprintf( psz_filename, MAX_PATH, snprintf( psz_filename, MAX_PATH,
"file://%s.folder.png", psz_dir ); "file://%s.folder.png", psz_path );
break; break;
} }
......
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