Changeset 18599 in josm for trunk


Ignore:
Timestamp:
2022-11-17T20:28:17+01:00 (2 years ago)
Author:
taylor.smock
Message:

Fix CID 1500633 and 1500634: dereference null return value

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/street_level/IImageEntry.java

    r18596 r18599  
    147147    default BufferedImage read(Dimension target) throws IOException {
    148148        URI imageUrl = getImageURI();
     149        if (imageUrl == null) {
     150            return null;
     151        }
    149152        Logging.info(tr("Loading {0}", imageUrl));
    150153        BufferedImage image = ImageProvider.read(imageUrl.toURL(), false, false,
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r18592 r18599  
    609609        @Override
    610610        public void actionPerformed(ActionEvent e) {
    611             if (currentEntry != null) {
     611            if (currentEntry != null && currentEntry.getImageURI() != null) {
    612612                try {
    613613                    PlatformManager.getPlatform().openUrl(currentEntry.getImageURI().toURL().toExternalForm());
Note: See TracChangeset for help on using the changeset viewer.