Changeset 11862 in josm


Ignore:
Timestamp:
2017-04-09T14:12:09+02:00 (2 years ago)
Author:
Don-vip
Message:

see #7427 - sonar - squid:S2259 - Null pointers should not be dereferenced

File:
1 edited

Legend:

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

    r11860 r11862  
    12031203        if (tile instanceof ReprojectionTile) {
    12041204            return ((ReprojectionTile) tile).getAnchor();
     1205        } else if (image != null) {
     1206            return new TileAnchor(new Point.Double(0, 0), new Point.Double(image.getWidth(), image.getHeight()));
    12051207        } else {
    1206             return new TileAnchor(new Point.Double(0, 0), new Point.Double(image.getWidth(), image.getHeight()));
     1208            return null;
    12071209        }
    12081210    }
Note: See TracChangeset for help on using the changeset viewer.