Merge
authorprr
Thu, 27 Feb 2014 11:56:24 -0800
changeset 23329 9d0dc1c406cc
parent 23328 4c53a6ebc779 (current diff)
parent 23327 c7aca991f60e (diff)
child 23330 31ee1f289ead
Merge
--- a/jdk/src/windows/native/sun/windows/MouseInfo.cpp	Thu Feb 27 10:43:53 2014 -0800
+++ b/jdk/src/windows/native/sun/windows/MouseInfo.cpp	Thu Feb 27 11:56:24 2014 -0800
@@ -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 @@
         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);
 
--- a/jdk/src/windows/native/sun/windows/awt_Rectangle.cpp	Thu Feb 27 10:43:53 2014 -0800
+++ b/jdk/src/windows/native/sun/windows/awt_Rectangle.cpp	Thu Feb 27 11:56:24 2014 -0800
@@ -46,14 +46,20 @@
     TRY;
 
     AwtRectangle::xID = env->GetFieldID(cls, "x", "I");
+    DASSERT(AwtRectangle::xID != NULL);
+    CHECK_NULL(AwtRectangle::xID);
+
     AwtRectangle::yID = env->GetFieldID(cls, "y", "I");
-    AwtRectangle::widthID = env->GetFieldID(cls, "width", "I");
-    AwtRectangle::heightID = env->GetFieldID(cls, "height", "I");
+    DASSERT(AwtRectangle::yID != NULL);
+    CHECK_NULL(AwtRectangle::yID);
 
-    DASSERT(AwtRectangle::xID != NULL);
-    DASSERT(AwtRectangle::yID != NULL);
+    AwtRectangle::widthID = env->GetFieldID(cls, "width", "I");
     DASSERT(AwtRectangle::widthID != NULL);
+    CHECK_NULL(AwtRectangle::widthID);
+
+    AwtRectangle::heightID = env->GetFieldID(cls, "height", "I");
     DASSERT(AwtRectangle::heightID != NULL);
+    CHECK_NULL(AwtRectangle::heightID);
 
     CATCH_BAD_ALLOC;
 }