summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2005-11-30 19:18:47 +0000
committerChristophe Fergeau <teuf@gnome.org>2005-11-30 19:18:47 +0000
commit114bc20689f6d1d6963510b49002e1955cbe1008 (patch)
tree1698dd1af205da23c511432f12d6ee8881928141
parent80ade88ec9ff5b45c7532c25f160e6bc7cd41533 (diff)
downloadlibgpod-114bc20689f6d1d6963510b49002e1955cbe1008.tar.gz
libgpod-114bc20689f6d1d6963510b49002e1955cbe1008.tar.xz
libgpod-114bc20689f6d1d6963510b49002e1955cbe1008.zip
2005-11-30 Christophe Fergeau <teuf@gnome.org>
* src/db-artwork-parser.c: (parse_mhni): don't crash if ipod_image_new_from_mhni returns NULL git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1182 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog5
-rw-r--r--src/db-artwork-parser.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 350df06..2b16f72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-30 Christophe Fergeau <teuf@gnome.org>
+
+ * src/db-artwork-parser.c: (parse_mhni): don't crash if
+ ipod_image_new_from_mhni returns NULL
+
2005-11-28 Christophe Fergeau <teuf@gnome.org>
* src/itdb_artwork.c: (unpack_RGB_565), (get_pixel_data):
diff --git a/src/db-artwork-parser.c b/src/db-artwork-parser.c
index fe88b7e..6796bbe 100644
--- a/src/db-artwork-parser.c
+++ b/src/db-artwork-parser.c
@@ -158,11 +158,13 @@ parse_mhni (DBParseContext *ctx, iPodSong *song, GError *error)
dump_mhni (mhni);
thumb = ipod_image_new_from_mhni (mhni, song->itdb);
- if (thumb != NULL) {
- song->artwork->thumbnails =
- g_list_append (song->artwork->thumbnails, thumb);
+ if (thumb == NULL) {
+ return 0;
}
+ song->artwork->thumbnails =
+ g_list_append (song->artwork->thumbnails, thumb);
+
mhod_ctx = db_parse_context_get_sub_context (ctx, ctx->header_len);
if (mhod_ctx == NULL) {
return -1;