[gimp] modules: verify that GimpColorConfig.rgb_profile is actually for RGB



commit 191b2aa2e833e0e5a0efabbdd534abde16839007
Author: Michael Natterer <mitch gimp org>
Date:   Sun Mar 23 21:16:39 2014 +0100

    modules: verify that GimpColorConfig.rgb_profile is actually for RGB

 modules/display-filter-lcms.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/modules/display-filter-lcms.c b/modules/display-filter-lcms.c
index e65d672..dbb1aea 100644
--- a/modules/display-filter-lcms.c
+++ b/modules/display-filter-lcms.c
@@ -411,6 +411,12 @@ cdisplay_lcms_get_rgb_profile (CdisplayLcms *lcms)
 
       if (config->rgb_profile)
         profile = cmsOpenProfileFromFile (config->rgb_profile, "r");
+
+      if (profile && ! gimp_lcms_profile_is_rgb (profile))
+        {
+          cmsCloseProfile (profile);
+          profile = NULL;
+        }
     }
 
   return profile;


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