src/solaris/native/sun/awt/awt_GraphicsEnv.c

Print this page

        

@@ -936,10 +936,15 @@
     }
 
     *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
      * we need to test that we can actually do XShmAttach.
      */