[gimp] app: conditionnally free new profile in gimp_image_convert_precision().
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: conditionnally free new profile in gimp_image_convert_precision().
- Date: Wed, 12 Sep 2018 11:55:29 +0000 (UTC)
commit ea67537d859ee415e7cc0c0666a152b29e458d09
Author: Jehan <jehan girinstud io>
Date: Mon Sep 10 15:54:09 2018 +0200
app: conditionnally free new profile in gimp_image_convert_precision().
Do not free a NULL pointer! This fixes a CRITICAL:
> g_object_unref: assertion 'G_IS_OBJECT (object)' failed
app/core/gimpimage-convert-precision.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpimage-convert-precision.c b/app/core/gimpimage-convert-precision.c
index bcf11186b9..04e6b6efc6 100644
--- a/app/core/gimpimage-convert-precision.c
+++ b/app/core/gimpimage-convert-precision.c
@@ -191,11 +191,14 @@ gimp_image_convert_precision (GimpImage *image,
}
if (new_profile)
- gimp_image_set_color_profile (image, new_profile, NULL);
+ {
+ gimp_image_set_color_profile (image, new_profile, NULL);
+ g_object_unref (new_profile);
+ }
else
- gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
-
- g_object_unref (new_profile);
+ {
+ gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
+ }
gimp_image_undo_group_end (image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]