From 4fee93a750c9706a71e19d6af83a2e1ee0bb297d Mon Sep 17 00:00:00 2001 From: Phil Race Date: Tue, 18 Mar 2014 15:49:19 -0700 Subject: [PATCH] 8034097: [parfait] JNI exception pending in jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m Reviewed-by: serb, jgodinez --- jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m b/jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m index dd61d0a9fd6..131dc1e0d6f 100644 --- a/jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m +++ b/jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m @@ -778,6 +778,10 @@ PRINT(" SetUpCGContext") qsdo->graphicsStateInfo.simpleStroke = NO; jint length = (*env)->GetArrayLength(env, dasharray); jfloat* jdashes = (jfloat*)(*env)->GetPrimitiveArrayCritical(env, dasharray, NULL); + if (jdashes == NULL) { + CGContextSetLineDash(cgRef, 0, NULL, 0); + return; + } CGFloat* dashes = (CGFloat*)malloc(sizeof(CGFloat)*length); if (dashes != NULL) {