From 790f5ae1e0f90bcbb85950a60b8597e4e40ed0ba Mon Sep 17 00:00:00 2001 From: Jonas Häggqvist Date: Fri, 12 Dec 2008 19:38:08 +0000 Subject: Pictureflow: - Always initialise artist and albumartist to NULL to avoid segfaults and other nastiness (closes FS#9266). Ideally they should be set to their actual values (would fix FS#9606), but this fix at least avoids some problems. - Be a bit more precise in the error given when no albumart is found. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19404 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/pictureflow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c index 232c3f6bc4..7a3495940c 100644 --- a/apps/plugins/pictureflow.c +++ b/apps/plugins/pictureflow.c @@ -510,6 +510,8 @@ bool get_albumart_for_index_from_db(const int slide_index, char *buf, int buflen PREFERRED_IMG_HEIGHT); rb->strncpy( (char*)&id3.path, tcs.result, MAX_PATH ); id3.album = get_album_name(slide_index); + /* xxx: Should set id3.artist / id3.albumartist to their real values */ + id3.artist = id3.albumartist = NULL; if ( rb->search_albumart_files(&id3, size, buf, buflen) ) result = true; else if ( rb->search_albumart_files(&id3, "", buf, buflen) ) @@ -652,7 +654,8 @@ bool create_albumart_cache(bool force) if ( rb->button_get(false) == PICTUREFLOW_MENU ) return false; } if ( slides == 0 ) { - rb->splash(2*HZ, "No albums found"); + /* Warn the user that we couldn't find any albumart */ + rb->splash(2*HZ, "No album art found"); return false; } config.avg_album_width /= slides; -- cgit v1.2.3