jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c
changeset 20423 23b2db6ffff4
parent 5506 202f599c92aa
child 23010 6dadb192ad81
--- a/jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c	Thu Oct 03 13:26:45 2013 -0700
+++ b/jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c	Thu Oct 03 13:35:26 2013 -0700
@@ -53,6 +53,7 @@
     unsigned char *bbuf;
     jint *ibuf;
     jint ipos;
+    jboolean hasException;
 
     J2dTraceLn2(J2D_TRACE_INFO,
                 "BufferedRenderPipe_fillSpans: bpos=%d limit=%d",
@@ -104,7 +105,10 @@
             ibuf[1] = spanCount;
 
             // flush the queue
-            JNU_CallMethodByName(env, NULL, rq, "flushNow", "(I)V", bpos);
+            JNU_CallMethodByName(env, &hasException, rq, "flushNow", "(I)V", bpos);
+            if (hasException) {
+                break;
+            }
 
             // now start a new operation
             ibuf = (jint *)bbuf;