8034095: [parfait] JNI exception pending in src/jdk/src/macosx/native/sun/awt/QuartzRenderer.m
Reviewed-by: serb, jgodinez
--- a/jdk/src/macosx/native/sun/awt/QuartzRenderer.m Tue Mar 18 23:22:45 2014 +0400
+++ b/jdk/src/macosx/native/sun/awt/QuartzRenderer.m Tue Mar 18 15:48:03 2014 -0700
@@ -438,6 +438,9 @@
{
SDRenderType renderType = SD_Nothing;
+ if (xpointsarray == NULL || ypointsarray == NULL) {
+ return SD_Nothing;
+ }
if (npoints > 1)
{
if (fill == YES)
@@ -452,7 +455,14 @@
jint i;
jint* xpoints = (jint*)(*env)->GetPrimitiveArrayCritical(env, xpointsarray, NULL);
+ if (xpoints == NULL) {
+ return SD_Nothing;
+ }
jint* ypoints = (jint*)(*env)->GetPrimitiveArrayCritical(env, ypointsarray, NULL);
+ if (ypoints == NULL) {
+ (*env)->ReleasePrimitiveArrayCritical(env, xpointsarray, xpoints, 0);
+ return SD_Nothing;
+ }
CGContextMoveToPoint(cgRef, xpoints[0]+offsetX, ypoints[0]+offsetY);