summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChris Palmer <palmer@google.com>2014-09-08 16:12:10 -0700
committerChris Palmer <palmer@google.com>2014-09-08 16:12:10 -0700
commit1efeeeb1d9d74dc50e7a62859c1944158e72560e (patch)
tree489e3f22eb4f3cdc9175f46dbf514e600c830f10 /core
parent4cf36954a1676e103f899bee0138610c76500b42 (diff)
downloadpdfium-1efeeeb1d9d74dc50e7a62859c1944158e72560e.tar.xz
Merge performance fix for cmsDupToneCurve from previous upstream branch.
BUG= R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/534363002
Diffstat (limited to 'core')
-rw-r--r--core/src/fxcodec/lcms2/lcms2-2.6/src/cmsgamma.c2
1 files changed, 1 insertions, 1 deletions
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);
}