diff --git a/jdk/src/solaris/native/sun/awt/X11Color.c b/jdk/src/solaris/native/sun/awt/X11Color.c index a1fdc584493..e7bf05b74df 100644 --- a/jdk/src/solaris/native/sun/awt/X11Color.c +++ b/jdk/src/solaris/native/sun/awt/X11Color.c @@ -1377,7 +1377,7 @@ awtJNI_CreateColorData(JNIEnv *env, AwtGraphicsConfigDataPtr adata, /* Unlock now to initialize the SystemColor class */ if (lock) { - AWT_UNLOCK (); + AWT_UNLOCK_CHECK_EXCEPTION(env); } sysColors = (*env)->FindClass (env, "java/awt/SystemColor"); CHECK_NULL(sysColors); diff --git a/jdk/src/solaris/native/sun/awt/awt.h b/jdk/src/solaris/native/sun/awt/awt.h index b611338311e..df5f60300b6 100644 --- a/jdk/src/solaris/native/sun/awt/awt.h +++ b/jdk/src/solaris/native/sun/awt/awt.h @@ -75,6 +75,12 @@ extern void awt_output_flush(); AWT_NOFLUSH_UNLOCK(); \ } while (0) +#define AWT_UNLOCK_CHECK_EXCEPTION(env) \ + do { \ + AWT_UNLOCK(); \ + JNU_CHECK_EXCEPTION(env); \ + } while (0) + #define AWT_LOCK_IMPL() \ (*env)->CallStaticVoidMethod(env, tkClass, awtLockMID)