summaryrefslogtreecommitdiff
path: root/src/cmsvirt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmsvirt.c')
-rw-r--r--src/cmsvirt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmsvirt.c b/src/cmsvirt.c
index eafa58b..c8be58c 100644
--- a/src/cmsvirt.c
+++ b/src/cmsvirt.c
@@ -1106,12 +1106,12 @@ cmsHPROFILE CMSEXPORT cmsTransform2DeviceLink(cmsHTRANSFORM hTransform, cmsFloat
_cmsOptimizePipeline(&LUT, xform ->RenderingIntent, &FrmIn, &FrmOut, &dwFlags);
// Put identity curves if needed
- if (cmsPipelineStageCount(LUT) == 1) {
-
- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn));
- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut));
- }
+ if (cmsPipelineGetPtrToFirstStage(LUT) ->Type != cmsSigCurveSetElemType)
+ cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn));
+ if (cmsPipelineGetPtrToLastStage(LUT) ->Type != cmsSigCurveSetElemType)
+ cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut));
+
AllowedLUT = FindCombination(LUT, Version >= 4.0, DestinationTag);
}