summaryrefslogtreecommitdiff
path: root/plugins/artwork/artwork.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/artwork/artwork.c')
-rw-r--r--plugins/artwork/artwork.c11
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;