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


Ignore:
Timestamp:
2016-02-28T00:55:12+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #12568 - NPE

File:
1 edited

Legend:

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

    r9825 r9893  
    244244        if (nativeScaleLayer != null) {
    245245            ScaleList scaleList = nativeScaleLayer.getNativeScales();
    246             return scaleList.getSnapScale(scale, PROP_ZOOM_RATIO.get(), floor).getScale();
     246            Scale snapscale = scaleList.getSnapScale(scale, PROP_ZOOM_RATIO.get(), floor);
     247            return snapscale != null ? snapscale.getScale() : scale;
    247248        } else {
    248249            return scale;
Note: See TracChangeset for help on using the changeset viewer.