diff options
Diffstat (limited to 'src/cmsopt.c')
-rw-r--r-- | src/cmsopt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmsopt.c b/src/cmsopt.c index fb12ee2..426ba88 100644 --- a/src/cmsopt.c +++ b/src/cmsopt.c @@ -1418,7 +1418,10 @@ cmsBool OptimizeByJoiningCurves(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUI GammaTables[i] = NULL; } - if (GammaTables != NULL) _cmsFree(Src ->ContextID, GammaTables); + if (GammaTables != NULL) { + _cmsFree(Src->ContextID, GammaTables); + GammaTables = NULL; + } // Maybe the curves are linear at the end if (!AllCurvesAreLinear(ObtainedCurves)) { |