You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
618 B
14 lines
618 B
4 months ago
|
diff --git a/third_party/lcms/src/cmsgamma.c b/third_party/lcms/src/cmsgamma.c
|
||
|
index edb8f6bba..eb3dd881c 100644
|
||
|
--- a/third_party/lcms/src/cmsgamma.c
|
||
|
+++ b/third_party/lcms/src/cmsgamma.c
|
||
|
@@ -799,7 +799,7 @@ void CMSEXPORT cmsFreeToneCurveTriple(cmsToneCurve* Curve[3])
|
||
|
// Duplicate a gamma table
|
||
|
cmsToneCurve* CMSEXPORT cmsDupToneCurve(const cmsToneCurve* In)
|
||
|
{
|
||
|
- if (In == NULL) return NULL;
|
||
|
+ if (In == NULL || In ->Segments == NULL || In ->Table16 == NULL) return NULL;
|
||
|
|
||
|
return AllocateToneCurveStruct(In ->InterpParams ->ContextID, In ->nEntries, In ->nSegments, In ->Segments, In ->Table16);
|
||
|
}
|