src/macosx/native/sun/awt/QuartzSurfaceData.m

Print this page

        

*** 776,785 **** --- 776,789 ---- if (dasharray != NULL) { 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) { jint i; for (i=0; i<length; i++)