8034097: [parfait] JNI exception pending in jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m

Reviewed-by: serb, jgodinez
This commit is contained in:
Phil Race 2014-03-18 15:49:19 -07:00
parent abd0683c07
commit 4fee93a750

View File

@ -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)
{