From 3187c1a8fb3d6d67bdbd7c4717174bd7b4fa7947 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Wed, 10 Jun 2015 12:43:18 -0700 Subject: [PATCH] 8081756: Mastering Matrix Manipulations Reviewed-by: serb, bae, mschoene --- jdk/src/java.desktop/share/native/liblcms/cmsopt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/src/java.desktop/share/native/liblcms/cmsopt.c b/jdk/src/java.desktop/share/native/liblcms/cmsopt.c index c3267ecf1bd..892ec0a4040 100644 --- a/jdk/src/java.desktop/share/native/liblcms/cmsopt.c +++ b/jdk/src/java.desktop/share/native/liblcms/cmsopt.c @@ -260,7 +260,9 @@ cmsBool _MultiplyMatrix(cmsPipeline* Lut) 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; }