提交 5d224f0e 编写于 作者: P prr

8034095: parfait] JNI exception pending in src/jdk/src/macosx/native/sun/awt/QuartzRenderer.m

Reviewed-by: jgodinez, serb
上级 33b7a944
......@@ -438,6 +438,9 @@ QUARTZ_RENDERER_INLINE SDRenderType doPolyUsingCG(JNIEnv *env, CGContextRef cgRe
{
SDRenderType renderType = SD_Nothing;
if (xpointsarray == NULL || ypointsarray == NULL) {
return SD_Nothing;
}
if (npoints > 1)
{
if (fill == YES)
......@@ -452,7 +455,14 @@ QUARTZ_RENDERER_INLINE SDRenderType doPolyUsingCG(JNIEnv *env, CGContextRef cgRe
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册