core/tags/album: Check for empty artist names before fetching album art
Otherwise we might crash when we attempt to look at ar_tokens[0]. Reported-by: Josh Larson <themutatedshrimp@gmail.com> Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
edcba6a353
commit
cce8666140
|
@ -138,7 +138,8 @@ static bool __album_query_artist(struct album *album, struct artist *al_artist,
|
|||
gchar *release, *artist, *year;
|
||||
bool found = false;
|
||||
|
||||
if (!al_artist || strcmp(al_artist->ar_tokens[0], "various") == 0)
|
||||
if (!al_artist || !string_length(al_artist->ar_name) ||
|
||||
strcmp(al_artist->ar_tokens[0], "various") == 0)
|
||||
return false;
|
||||
|
||||
release = g_strdup_printf("release:\"%s\"~", lower);
|
||||
|
|
Loading…
Reference in New Issue