summaryrefslogtreecommitdiffstats
path: root/src/db-artwork-writer.c
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2006-06-01 13:31:11 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2006-06-01 13:31:11 +0000
commit1caaeade460f1e6e3226c8f0606be2f1f3b9b102 (patch)
treefaa665d85b87f05dbf508f8450349be41dba8ee9 /src/db-artwork-writer.c
parentf1cb3021ff07ec367136c0dc6c8d9fd3a8f78fb7 (diff)
downloadlibgpod-tmz-1caaeade460f1e6e3226c8f0606be2f1f3b9b102.tar.gz
libgpod-tmz-1caaeade460f1e6e3226c8f0606be2f1f3b9b102.tar.xz
libgpod-tmz-1caaeade460f1e6e3226c8f0606be2f1f3b9b102.zip
* 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
Diffstat (limited to 'src/db-artwork-writer.c')
-rw-r--r--src/db-artwork-writer.c3
1 files changed, 2 insertions, 1 deletions
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 (