changeset 242:59eac2063093

Fix a segfault occuring when using --without-exiv2 and concerning exif stuff.
author zas_
date Thu, 03 Apr 2008 21:50:53 +0000
parents cdec56e38dd1
children 16ceff6d6e1b
files src/exif.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/exif.c	Thu Apr 03 21:49:17 2008 +0000
+++ b/src/exif.c	Thu Apr 03 21:50:53 2008 +0000
@@ -538,11 +538,13 @@
 
 guint exif_item_get_tag_id(ExifItem *item)
 {
+	if (!item) return 0;
 	return item->tag;
 }
 
 guint exif_item_get_elements(ExifItem *item)
 {
+	if (!item) return 0;
 	return item->elements;
 }
 
@@ -555,6 +557,7 @@
 
 guint exif_item_get_format_id(ExifItem *item)
 {
+	if (!item) return EXIF_FORMAT_UNKNOWN;
 	return item->format;
 }