47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From 230cdd4e3890b44ca6dd8147609016b15c91eb9a Mon Sep 17 00:00:00 2001
|
|
From: Nils Philippsen <nils@redhat.com>
|
|
Date: Wed, 29 May 2013 15:35:12 +0200
|
|
Subject: [PATCH] patch: color-profile-crash
|
|
|
|
Squashed commit of the following:
|
|
|
|
commit 3328d54954cfcdc403cdfe167f969a5edb248bc1
|
|
Author: Nils Philippsen <nils@redhat.com>
|
|
Date: Mon Mar 18 13:37:17 2013 +0100
|
|
|
|
app: set error in case of error in ICC profile plug-in
|
|
|
|
The function plug_in_icc_profile_apply_rgb() didn't set the error object
|
|
when bailing out due to being called on a grayscale image, this could
|
|
lead to crashes in callers which just checked the return value, but not
|
|
whether or not an error had been set.
|
|
(cherry picked from commit 096c636b67abd7967da645699948c2bd3f8273fb)
|
|
|
|
Conflicts:
|
|
app/plug-in/plug-in-icc-profile.c
|
|
---
|
|
app/plug-in/plug-in-icc-profile.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/app/plug-in/plug-in-icc-profile.c b/app/plug-in/plug-in-icc-profile.c
|
|
index 268b5b8..cc5ec79 100644
|
|
--- a/app/plug-in/plug-in-icc-profile.c
|
|
+++ b/app/plug-in/plug-in-icc-profile.c
|
|
@@ -69,7 +69,12 @@ plug_in_icc_profile_apply_rgb (GimpImage *image,
|
|
gimp = image->gimp;
|
|
|
|
if (gimp_image_base_type (image) == GIMP_GRAY)
|
|
- return FALSE;
|
|
+ {
|
|
+ g_set_error (error, GIMP_PLUG_IN_ERROR, GIMP_PLUG_IN_EXECUTION_FAILED,
|
|
+ _("Can't apply color profile to grayscale image (%s)"),
|
|
+ ICC_PROFILE_APPLY_RGB_PROC);
|
|
+ return FALSE;
|
|
+ }
|
|
|
|
procedure = gimp_pdb_lookup_procedure (gimp->pdb, ICC_PROFILE_APPLY_RGB_PROC);
|
|
|
|
--
|
|
1.8.1.4
|
|
|