changeset 23321:7f1737ac8b30

8034766: [parfait] JNI exception pending in jdk/src/macosx/native/sun/awt/CRobot.m Reviewed-by: anthony, bagiras
author serb
date Tue, 25 Feb 2014 17:37:55 +0400
parents fa1a77a296fc
children d3267402aaae
files jdk/src/macosx/native/sun/awt/CRobot.m
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/macosx/native/sun/awt/CRobot.m	Tue Feb 25 17:19:15 2014 +0400
+++ b/jdk/src/macosx/native/sun/awt/CRobot.m	Tue Feb 25 17:37:55 2014 +0400
@@ -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 <JavaNativeFoundation/JavaNativeFoundation.h>
 #import <ApplicationServices/ApplicationServices.h>
 
@@ -342,6 +345,7 @@
 
     // 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(