[gimp] Bug 644891 - Ctrl+e crashes gimp



commit 0d0ffd12650cac3154bf6762bf3364ab1116bde1
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu Mar 17 20:23:09 2011 +0100

    Bug 644891 - Ctrl+e crashes gimp
    
    Don't freak out if setting an URI on GimpImage that was getted with
    the corresponding getter. Fix by Massimo.

 app/core/gimpimage.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 7e1943b..6a165b0 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1648,6 +1648,9 @@ gimp_image_set_imported_uri (GimpImage   *image,
 {
   g_return_if_fail (GIMP_IS_IMAGE (image));
 
+  if (gimp_image_get_imported_uri (image) == uri)
+    return;
+
   g_object_set_data_full (G_OBJECT (image), GIMP_FILE_IMPORT_SOURCE_URI_KEY,
                           g_strdup (uri), (GDestroyNotify) g_free);
 }
@@ -1666,6 +1669,9 @@ gimp_image_set_exported_uri (GimpImage   *image,
 {
   g_return_if_fail (GIMP_IS_IMAGE (image));
 
+  if (gimp_image_get_exported_uri (image) == uri)
+    return;
+
   g_object_set_data_full (G_OBJECT (image),
                           GIMP_FILE_EXPORT_URI_KEY,
                           g_strdup (uri), (GDestroyNotify) g_free);
@@ -1685,6 +1691,9 @@ gimp_image_set_save_a_copy_uri (GimpImage   *image,
 {
   g_return_if_fail (GIMP_IS_IMAGE (image));
 
+  if (gimp_image_get_save_a_copy_uri (image) == uri)
+    return;
+
   g_object_set_data_full (G_OBJECT (image),
                           GIMP_FILE_SAVE_A_COPY_URI_KEY,
                           g_strdup (uri), (GDestroyNotify) g_free);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]