eog r4698 - in trunk: . src
- From: friemann svn gnome org
- To: svn-commits-list gnome org
- Subject: eog r4698 - in trunk: . src
- Date: Thu, 21 Aug 2008 10:13:37 +0000 (UTC)
Author: friemann
Date: Thu Aug 21 10:13:37 2008
New Revision: 4698
URL: http://svn.gnome.org/viewvc/eog?rev=4698&view=rev
Log:
2008-08-21 Felix Riemann <friemann svn gnome org>
* src/eog-properties-dialog.c: (eog_exif_set_focal_length_label):
Fix segfaults with XMP-only files when opening properties dialog.
Fixes bug #548738.
Modified:
trunk/ChangeLog
trunk/src/eog-properties-dialog.c
Modified: trunk/src/eog-properties-dialog.c
==============================================================================
--- trunk/src/eog-properties-dialog.c (original)
+++ trunk/src/eog-properties-dialog.c Thu Aug 21 10:13:37 2008
@@ -203,10 +203,14 @@
gfloat f_val = 0.0;
gchar *fl_text = NULL,*fl35_text = NULL;
- entry = exif_data_get_entry (exif_data, EXIF_TAG_FOCAL_LENGTH);
- entry35mm = exif_data_get_entry (exif_data,
- EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM);
- byte_order = exif_data_get_byte_order (exif_data);
+ /* If no ExifData is supplied the label will be
+ * cleared later as *fl35text is NULL. */
+ if (exif_data != NULL) {
+ entry = exif_data_get_entry (exif_data, EXIF_TAG_FOCAL_LENGTH);
+ entry35mm = exif_data_get_entry (exif_data,
+ EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM);
+ byte_order = exif_data_get_byte_order (exif_data);
+ }
if (entry && G_LIKELY (entry->format == EXIF_FORMAT_RATIONAL)) {
ExifRational value;
@@ -247,6 +251,7 @@
gtk_label_set_text (GTK_LABEL (w), fl_text);
}
} else {
+ /* This will also clear the label if no ExifData was supplied */
gtk_label_set_text (GTK_LABEL (w), fl35_text);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]