< prev index next >

modules/javafx.graphics/src/main/native-glass/mac/GlassRobot.m

Print this page

        

@@ -482,15 +482,17 @@
                     (*env)->ReleaseIntArrayElements(env, pixelArray, javaPixels, 0);
 
                     jfloat scale = (*env)->CallStaticFloatMethod(env,
                             [GlassHelper ClassForName:"com.sun.glass.ui.Application" withEnv:env],
                             javaIDs.Application.getScaleFactor, x, y, width, height);
+                     if ((*env)->ExceptionCheck(env)) return NULL;
 
                     // create Pixels
                     pixels = (*env)->CallStaticObjectMethod(env,
                             [GlassHelper ClassForName:"com.sun.glass.ui.Application" withEnv:env],
                             javaIDs.Application.createPixels, pixWidth, pixHeight, pixelArray, scale, scale);
+                    if ((*env)->ExceptionCheck(env)) return NULL;
                 }
             }
 
             CGImageRelease(screenImage);
         }
< prev index next >