diff options
| author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2016-08-06 13:04:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-06 13:04:56 +0200 |
| commit | 4a2a8693e5a02207a8813b02a375abdc4e43c49b (patch) | |
| tree | 546b6aa9a7ed2bdbd215775ef1bf375e2d6a0598 /thirdparty/liblcms2/src/cmsvirt.c | |
| parent | 1509ccc51f8de0523821ffd2f3d1946b10e49614 (diff) | |
Update to lcms 2.8 (#808)
Diffstat (limited to 'thirdparty/liblcms2/src/cmsvirt.c')
| -rw-r--r-- | thirdparty/liblcms2/src/cmsvirt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/thirdparty/liblcms2/src/cmsvirt.c b/thirdparty/liblcms2/src/cmsvirt.c index 2897adb3..b8795be2 100644 --- a/thirdparty/liblcms2/src/cmsvirt.c +++ b/thirdparty/liblcms2/src/cmsvirt.c @@ -1138,15 +1138,20 @@ cmsHPROFILE CMSEXPORT cmsTransform2DeviceLink(cmsHTRANSFORM hTransform, cmsFloat // If no way, then force CLUT that for sure can be written if (AllowedLUT == NULL) { + cmsStage* FirstStage; + cmsStage* LastStage; + dwFlags |= cmsFLAGS_FORCE_CLUT; _cmsOptimizePipeline(ContextID, &LUT, xform ->RenderingIntent, &FrmIn, &FrmOut, &dwFlags); // Put identity curves if needed - if (cmsPipelineGetPtrToFirstStage(LUT) ->Type != cmsSigCurveSetElemType) + FirstStage = cmsPipelineGetPtrToFirstStage(LUT); + if (FirstStage != NULL && FirstStage ->Type != cmsSigCurveSetElemType) if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn))) goto Error; - if (cmsPipelineGetPtrToLastStage(LUT) ->Type != cmsSigCurveSetElemType) + LastStage = cmsPipelineGetPtrToLastStage(LUT); + if (LastStage != NULL && LastStage ->Type != cmsSigCurveSetElemType) if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut))) goto Error; |
