diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-07-05 20:51:55 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-07-05 20:51:55 +0200 |
commit | 9d89e6910ef356caf626cbdb9d1d7104e3dc62ef (patch) | |
tree | fd15936ee29c62ea772b2d3b0ac1285a9b8d2074 /plugins/artwork | |
parent | 266e8ac39cdf0c367788e89654f06394842bdf97 (diff) |
artwork: fixed crash when showing album art in notification for untagged tracks (bug #1144)
Diffstat (limited to 'plugins/artwork')
-rw-r--r-- | plugins/artwork/artwork.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c index a6c27172..e69c61e4 100644 --- a/plugins/artwork/artwork.c +++ b/plugins/artwork/artwork.c @@ -144,10 +144,15 @@ make_cache_dir_path (char *path, int size, const char *artist, int img_size) { char esc_artist[PATH_MAX]; int i; - for (i = 0; artist[i]; i++) { - esc_artist[i] = esc_char (artist[i]); + if (artist) { + for (i = 0; artist[i]; i++) { + esc_artist[i] = esc_char (artist[i]); + } + esc_artist[i] = 0; + } + else { + strcpy (esc_artist, "Unknown artist"); } - esc_artist[i] = 0; const char *cache = getenv ("XDG_CACHE_HOME"); int sz; |