[gimp] app: make sure builtin profiles *really* don't get attached to images



commit 07ffef38c360597a45de36db0fba137e39cee05a
Author: Michael Natterer <mitch gimp org>
Date:   Thu May 30 16:07:57 2019 +0200

    app: make sure builtin profiles *really* don't get attached to images
    
    gimp_image_parasite_attach(): when we detected that a builtin profile
    is about to be attached, actually bail out after removing the old
    profile, instead of continuing to attaching the builtin profile
    anyway. Gah...

 app/core/gimpimage.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index abf0cf30e4..025cbc4949 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -3620,7 +3620,12 @@ gimp_image_parasite_attach (GimpImage          *image,
       builtin = gimp_image_get_builtin_color_profile (image);
 
       if (gimp_color_profile_is_equal (profile, builtin))
-        gimp_image_parasite_detach (image, GIMP_ICC_PROFILE_PARASITE_NAME);
+        {
+          /* setting the builtin profile is equal to removing the profile */
+          gimp_image_parasite_detach (image, GIMP_ICC_PROFILE_PARASITE_NAME);
+          g_object_unref (profile);
+          return;
+        }
 
       g_object_unref (profile);
     }


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