Fixed a cms bug involving side effects and early return - bug 454747. r=vlad

This commit is contained in:
Bobby Holley 2008-09-11 12:31:28 -07:00
Родитель ae6ade2a51
Коммит 9e48c71bef
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -1539,6 +1539,10 @@ _LPcmsTRANSFORM PickTransformRoutine(_LPcmsTRANSFORM p,
(p -> ExitColorSpace == icSigRgbData) &&
!(p -> dwOriginalFlags & cmsFLAGS_BLACKPOINTCOMPENSATION)) {
// We've found our type of transform - don't override it later with a precalculated transform
p -> dwOriginalFlags |= cmsFLAGS_NOTPRECALC;
// If the input profile pointer-matches with the output profile,
// optimize the transformation away into a null xform
if (p -> InputProfile == p -> OutputProfile) {
@ -1568,8 +1572,6 @@ _LPcmsTRANSFORM PickTransformRoutine(_LPcmsTRANSFORM p,
p -> xform = (p -> dwOriginalFlags & cmsFLAGS_FLOATSHAPER) ? MatrixShaperXFORMFloat : MatrixShaperXFORM;
#endif
p -> dwOriginalFlags |= cmsFLAGS_NOTPRECALC;
if (!cmsBuildSmeltMatShaper(p))
{
cmsSignalError(LCMS_ERRC_ABORTED, "unable to smelt shaper-matrix, required tags missing");