summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarti Maria <info@littlecms.com>2013-03-29 18:56:51 +0100
committerMarti Maria <info@littlecms.com>2013-03-29 18:56:51 +0100
commit570d411a316052fcc84f6bffe3940a01b6c422b7 (patch)
tree177d2e430ed2abeb9d37bbd68856807aeec65e9a /src
parent12481eb65b723533a74cf754d6d631d599ab8ec5 (diff)
downloadlcms2-570d411a316052fcc84f6bffe3940a01b6c422b7.tar.gz
Fixing a typo (II)
Diffstat (limited to 'src')
-rw-r--r--src/cmsgmt.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/cmsgmt.c b/src/cmsgmt.c
index 56e6921..2e6b3cb 100644
--- a/src/cmsgmt.c
+++ b/src/cmsgmt.c
@@ -385,17 +385,21 @@ cmsPipeline* _cmsCreateGamutCheckPipeline(cmsContext ContextID,
// dE when doing a transform back and forth on the colorimetric intent.
Gamut = cmsPipelineAlloc(ContextID, 3, 1);
+ if (Gamut != NULL) {
- if (Gamut != NULL) {
+ CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL);
+ if (CLUT == NULL) {
- CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL);
- if (!cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT)) {
- cmsPipelineFree(Gamut);
- Gamut = NULL;
- } else
- cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0);
- }
- }
+ cmsPipelineFree(Gamut);
+ Gamut = NULL;
+ }
+ else {
+
+ cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT);
+ cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0);
+ }
+ }
+ }
else
Gamut = NULL; // Didn't work...