diff options
Diffstat (limited to 'src/eog-exif-util.c')
-rw-r--r-- | src/eog-exif-util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/eog-exif-util.c b/src/eog-exif-util.c index a39108d6..4240e6d4 100644 --- a/src/eog-exif-util.c +++ b/src/eog-exif-util.c @@ -310,8 +310,10 @@ const gchar * eog_exif_data_get_value (EogExifData *exif_data, const char *tag_id, gchar *buffer, guint buf_size) { char *data = gexiv2_metadata_get_tag_string (exif_data, tag_id); - strncpy (buffer, data, buf_size - 1); - g_free (data); + if (data != NULL) { + strncpy (buffer, data, buf_size - 1); + g_free (data); + } return buffer; } |