From b5df3005f090ac96a0bb13f35ef7cdddbbb6b8b7 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Tue, 25 Feb 2014 17:37:55 +0400 Subject: [PATCH] 8034766: [parfait] JNI exception pending in jdk/src/macosx/native/sun/awt/CRobot.m Reviewed-by: anthony, bagiras --- jdk/src/macosx/native/sun/awt/CRobot.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jdk/src/macosx/native/sun/awt/CRobot.m b/jdk/src/macosx/native/sun/awt/CRobot.m index fa88b87fe47..8d4f2a052be 100644 --- a/jdk/src/macosx/native/sun/awt/CRobot.m +++ b/jdk/src/macosx/native/sun/awt/CRobot.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,9 @@ * questions. */ + +#import "jni_util.h" + #import #import @@ -342,6 +345,7 @@ Java_sun_lwawt_macosx_CRobot_nativeGetScreenPixels // get a pointer to the Java int array void *jPixelData = (*env)->GetPrimitiveArrayCritical(env, pixels, 0); + CHECK_NULL(jPixelData); // create a graphics context around the Java int array CGColorSpaceRef picColorSpace = CGColorSpaceCreateWithName(