jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
changeset 26348 da1711644b77
parent 24130 db72fc72f87b
--- a/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c	Wed Aug 13 21:45:53 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c	Thu Aug 14 14:19:58 2014 +0100
@@ -1348,7 +1348,9 @@
     }
 
     /* Make Color Model object for this GraphicsConfiguration */
-    colorModel = awtJNI_GetColorModel (env, adata);
+    colorModel = (*env)->ExceptionCheck(env)
+                 ? NULL : awtJNI_GetColorModel (env, adata);
+
     AWT_UNLOCK ();
 
     return colorModel;
@@ -2052,7 +2054,7 @@
 
     AWT_FLUSH_UNLOCK();
 
-    if (!success) {
+    if (!success && !(*env)->ExceptionCheck(env)) {
         JNU_ThrowInternalError(env, "Could not set display mode");
     }
 #endif /* !HEADLESS */