[gimp] app: fix the new gimp_color_profile_store_add_defaults()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix the new gimp_color_profile_store_add_defaults()
- Date: Sun, 22 May 2016 11:28:00 +0000 (UTC)
commit ae1fdd9eeb89fac78a92af2053a692c53a99e2f3
Author: Michael Natterer <mitch gimp org>
Date: Sun May 22 13:24:20 2016 +0200
app: fix the new gimp_color_profile_store_add_defaults()
A NULL profile is only an error if it's NULL because opening
the .icc failed, not just because none is configured...
app/widgets/gimpwidgets-utils.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index a38c26e..862058c 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -1388,6 +1388,7 @@ gimp_color_profile_store_add_defaults (GimpColorProfileStore *store,
GimpColorProfile *profile;
const Babl *format;
gchar *label;
+ GError *my_error = NULL;
g_return_val_if_fail (GIMP_IS_COLOR_PROFILE_STORE (store), FALSE);
g_return_val_if_fail (GIMP_IS_COLOR_CONFIG (config), FALSE);
@@ -1401,14 +1402,14 @@ gimp_color_profile_store_add_defaults (GimpColorProfileStore *store,
label = g_strdup_printf (_("Built-in grayscale (%s)"),
gimp_color_profile_get_label (profile));
- profile = gimp_color_config_get_gray_color_profile (config, error);
+ profile = gimp_color_config_get_gray_color_profile (config, &my_error);
}
else
{
label = g_strdup_printf (_("Built-in RGB (%s)"),
gimp_color_profile_get_label (profile));
- profile = gimp_color_config_get_rgb_color_profile (config, error);
+ profile = gimp_color_config_get_rgb_color_profile (config, &my_error);
}
gimp_color_profile_store_add_file (store, NULL, label);
@@ -1442,6 +1443,12 @@ gimp_color_profile_store_add_defaults (GimpColorProfileStore *store,
return TRUE;
}
+ else if (my_error)
+ {
+ g_propagate_error (error, my_error);
- return FALSE;
+ return FALSE;
+ }
+
+ return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]