--- a/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Wed Jul 10 11:49:04 2013 -0700
+++ b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Mon Jul 22 12:52:15 2013 -0700
@@ -926,6 +926,11 @@
*shmExt = canUseShmExt = CANT_USE_MITSHM;
*shmPixmaps = canUseShmExtPixmaps = CANT_USE_MITSHM;
+ if (awt_display == (Display *)NULL) {
+ AWT_NOFLUSH_UNLOCK();
+ return;
+ }
+
/**
* XShmQueryExtension returns False in remote server case.
* Unfortunately it also returns True in ssh case, so
--- a/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c Wed Jul 10 11:49:04 2013 -0700
+++ b/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c Mon Jul 22 12:52:15 2013 -0700
@@ -267,13 +267,19 @@
char *maskData;
XImage* defaultImg;
jfieldID maskImgID;
- jlong fmt8 =
- ptr_to_jlong(XRenderFindStandardFormat(awt_display, PictStandardA8));
- jlong fmt32 =
- ptr_to_jlong(XRenderFindStandardFormat(awt_display, PictStandardARGB32));
+ jlong fmt8;
+ jlong fmt32;
+
jfieldID a8ID = (*env)->GetStaticFieldID(env, cls, "FMTPTR_A8", "J");
jfieldID argb32ID = (*env)->GetStaticFieldID(env, cls, "FMTPTR_ARGB32", "J");
+ if (awt_display == (Display *)NULL) {
+ return;
+ }
+
+ fmt8 = ptr_to_jlong(XRenderFindStandardFormat(awt_display, PictStandardA8));
+ fmt32 = ptr_to_jlong(XRenderFindStandardFormat(awt_display, PictStandardARGB32));
+
(*env)->SetStaticLongField(env, cls, a8ID, fmt8);
(*env)->SetStaticLongField(env, cls, argb32ID, fmt32);