Changeset 10471 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2016-06-24T01:36:49+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13043 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r10470 r10471  
    485485        for (GraphicsDevice gd: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) {
    486486            DisplayMode dm = gd.getDisplayMode();
    487             height = Math.max(height, dm.getHeight());
    488             width = Math.max(width, dm.getWidth());
     487            if (dm != null) {
     488                height = Math.max(height, dm.getHeight());
     489                width = Math.max(width, dm.getWidth());
     490            }
    489491        }
    490492        if (height == 0 || width == 0) {
Note: See TracChangeset for help on using the changeset viewer.