8081756: Mastering Matrix Manipulations
authorprr
Wed, 10 Jun 2015 12:43:18 -0700
changeset 31433 a1c315dd1554
parent 31432 15d0fd22179a
child 31434 3b61ff08431b
8081756: Mastering Matrix Manipulations Reviewed-by: serb, bae, mschoene
jdk/src/java.desktop/share/native/liblcms/cmsopt.c
--- a/jdk/src/java.desktop/share/native/liblcms/cmsopt.c	Wed Jun 10 17:18:10 2015 +0300
+++ b/jdk/src/java.desktop/share/native/liblcms/cmsopt.c	Wed Jun 10 12:43:18 2015 -0700
@@ -260,7 +260,9 @@
                             cmsStage* Multmat = cmsStageAllocMatrix(Lut->ContextID, 3, 3, (const cmsFloat64Number*) &res, NULL);
 
                             // Recover the chain
-                            Multmat->Next = chain;
+                            if (Multmat != NULL) {
+                                Multmat->Next = chain;
+                            }
                             *pt1 = Multmat;
                      }