From 22157c552af2ecbf261fd5611ec785e7b8843d87 Mon Sep 17 00:00:00 2001 From: Jens Finke Date: Thu, 13 Mar 2003 15:59:32 +0000 Subject: [PATCH] Assert that exif attribute is NULL on load. (eog_image_free_mem): Free 2003-03-13 Jens Finke * libeog/eog-image.c (real_image_load): Assert that exif attribute is NULL on load. (eog_image_free_mem): Free exif info too. --- ChangeLog | 6 ++++++ libeog/eog-image.c | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e340890d..ab22333c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-13 Jens Finke + + * libeog/eog-image.c (real_image_load): Assert that exif attribute + is NULL on load. + (eog_image_free_mem): Free exif info too. + 2003-03-13 Jens Finke Added optional libexif support to read information stored in the diff --git a/libeog/eog-image.c b/libeog/eog-image.c index bfba939e..05160431 100644 --- a/libeog/eog-image.c +++ b/libeog/eog-image.c @@ -786,6 +786,7 @@ real_image_load (gpointer data) #endif g_assert (priv->image == NULL); + g_assert (priv->exif == NULL); result = gnome_vfs_open_uri (&handle, priv->uri, GNOME_VFS_OPEN_READ); if (result != GNOME_VFS_OK) { @@ -840,13 +841,6 @@ real_image_load (gpointer data) g_mutex_lock (priv->status_mutex); -#if HAVE_EXIF - if (priv->exif != NULL) { - exif_data_unref (priv->exif); - priv->exif = NULL; - } -#endif - if (failed) { if (priv->image != NULL) { g_object_unref (priv->image); @@ -1216,6 +1210,13 @@ eog_image_free_mem (EogImage *img) gdk_pixbuf_unref (priv->image); priv->image = NULL; } + +#if HAVE_EXIF + if (priv->exif != NULL) { + exif_data_unref (priv->exif); + priv->exif = NULL; + } +#endif } const gchar*