summaryrefslogtreecommitdiff
path: root/src/cmsgamma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmsgamma.c')
-rw-r--r--src/cmsgamma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmsgamma.c b/src/cmsgamma.c
index 94c0aef..5abbf16 100644
--- a/src/cmsgamma.c
+++ b/src/cmsgamma.c
@@ -823,6 +823,10 @@ cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cm
{
cmsCurveSegment Seg[3];
+ // Do some housekeeping
+ if (nEntries == 0 || values == NULL)
+ return NULL;
+
// A segmented tone curve should have function segments in the first and last positions
// Initialize segmented curve part up to 0 to constant value = samples[0]
Seg[0].x0 = MINUS_INF;