From 1efeeeb1d9d74dc50e7a62859c1944158e72560e Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Mon, 8 Sep 2014 16:12:10 -0700 Subject: Merge performance fix for cmsDupToneCurve from previous upstream branch. BUG= R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/534363002 --- core/src/fxcodec/lcms2/lcms2-2.6/src/cmsgamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/fxcodec') diff --git a/core/src/fxcodec/lcms2/lcms2-2.6/src/cmsgamma.c b/core/src/fxcodec/lcms2/lcms2-2.6/src/cmsgamma.c index d5aa87b105..97aeb7cc16 100644 --- a/core/src/fxcodec/lcms2/lcms2-2.6/src/cmsgamma.c +++ b/core/src/fxcodec/lcms2/lcms2-2.6/src/cmsgamma.c @@ -822,7 +822,7 @@ cmsToneCurve* CMSEXPORT cmsDupToneCurve(const cmsToneCurve* In) // Xiaochuan Liu // fix openpdf bug(mantis id:0055683, google id:360198) // the function CurveSetElemTypeFree in cmslut.c also needs to check pointer - if (In == NULL || In ->InterpParams == NULL) return NULL; + if (In == NULL || In ->InterpParams == NULL || In ->Segments == NULL || In ->Table16 == NULL) return NULL; return AllocateToneCurveStruct(In ->InterpParams ->ContextID, In ->nEntries, In ->nSegments, In ->Segments, In ->Table16); } -- cgit v1.2.3