From d1e1877a7f637fa9240dd8f920c6ca663fb9c0e8 Mon Sep 17 00:00:00 2001 From: Petr Pchelko Date: Thu, 27 Feb 2014 22:54:14 +0400 Subject: [PATCH] 8035860: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/MouseInfo.cpp Reviewed-by: anthony, serb --- jdk/src/windows/native/sun/windows/MouseInfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/src/windows/native/sun/windows/MouseInfo.cpp b/jdk/src/windows/native/sun/windows/MouseInfo.cpp index 4878fa248f5..b109f28ded8 100644 --- a/jdk/src/windows/native/sun/windows/MouseInfo.cpp +++ b/jdk/src/windows/native/sun/windows/MouseInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -95,7 +95,9 @@ Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords(JNIEnv *env, jclass cls, j env->DeleteLocalRef(pointClassLocal); } xID = env->GetFieldID(pointClass, "x", "I"); + CHECK_NULL_RETURN(xID, (jint)0); yID = env->GetFieldID(pointClass, "y", "I"); + CHECK_NULL_RETURN(yID, (jint)0); env->SetIntField(point, xID, pt.x); env->SetIntField(point, yID, pt.y);