jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java

Print this page

        

@@ -179,10 +179,13 @@
             // we do not expect that this may happen, the only response
             // is to re-initialize the list of devices
             initDevices();
 
             d = devices.get(mainDisplayID);
+            if (d == null) {
+                throw new AWTError("no screen devices");
+            }
         }
         return d;
     }
 
     @Override