changeset 6320:56f01b89d8b8

8007925: Improve cmsStageAllocLabV2ToV4curves 8007926: Improve cmsPipelineDup Reviewed-by: bae, prr Contributed-by: jia-hong.chen@oracle.com
author bae
date Thu, 28 Mar 2013 23:01:08 +0400
parents 09c14ca57ff0
children c14aa930b032
files src/share/native/sun/java2d/cmm/lcms/cmslut.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/java2d/cmm/lcms/cmslut.c	Thu Mar 28 22:17:04 2013 +0400
+++ b/src/share/native/sun/java2d/cmm/lcms/cmslut.c	Thu Mar 28 23:01:08 2013 +0400
@@ -1021,6 +1021,7 @@
     mpe = cmsStageAllocToneCurves(ContextID, 3, LabTable);
     cmsFreeToneCurveTriple(LabTable);
 
+    if (mpe == NULL) return mpe;
     mpe ->Implements = cmsSigLabV2toV4;
     return mpe;
 }
@@ -1424,6 +1425,8 @@
     if (lut == NULL) return NULL;
 
     NewLUT = cmsPipelineAlloc(lut ->ContextID, lut ->InputChannels, lut ->OutputChannels);
+    if (NewLUT == NULL) return NULL;
+
     for (mpe = lut ->Elements;
          mpe != NULL;
          mpe = mpe ->Next) {