From 1caaeade460f1e6e3226c8f0606be2f1f3b9b102 Mon Sep 17 00:00:00 2001 From: Jorg Schuler Date: Thu, 1 Jun 2006 13:31:11 +0000 Subject: * src/db-artwork-writer.c (write_mhni): fix segfault caused by wrong access of enum inside Itdb_DB git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1295 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- src/db-artwork-writer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/db-artwork-writer.c') diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c index 079644c..cd97e56 100644 --- a/src/db-artwork-writer.c +++ b/src/db-artwork-writer.c @@ -453,7 +453,8 @@ write_mhni (Itdb_DB *db, Itdb_Thumb *thumb, int correlation_id, iPodBuffer *buff mhni->ithmb_offset = get_gint32 (thumb->offset, buffer->byte_order); /* Work out the image padding */ - format = itdb_device_get_artwork_formats (db->db.photodb->device); + format = itdb_device_get_artwork_formats (db_get_device (db)); + g_return_val_if_fail (format, 0); while( format->type != thumb->type && format->type != -1 ) format++; mhni->vertical_padding = get_gint16 ( -- cgit