Index: trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 10470)
+++ trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 10471)
@@ -485,6 +485,8 @@
         for (GraphicsDevice gd: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) {
             DisplayMode dm = gd.getDisplayMode();
-            height = Math.max(height, dm.getHeight());
-            width = Math.max(width, dm.getWidth());
+            if (dm != null) {
+                height = Math.max(height, dm.getHeight());
+                width = Math.max(width, dm.getWidth());
+            }
         }
         if (height == 0 || width == 0) {
