Changeset 35202 in osm for applications


Ignore:
Timestamp:
2019-10-27T13:59:55+01:00 (5 years ago)
Author:
donvip
Message:

fix #josm17603 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/StreetsideMainDialog.java

    r34432 r35202  
    535535        public void selectedImageChanged(StreetsideAbstractImage oldImage, StreetsideAbstractImage newImage) {
    536536                setImage(newImage);
    537                 if (newImage.getSequence() != null && newImage.next()!=null) {
    538       nextButton.setEnabled(true);
    539     }
    540     if (newImage.getSequence() != null && newImage.previous()!=null) {
    541       previousButton.setEnabled(true);
    542     }
     537                if (newImage != null && newImage.getSequence() != null) {
     538                if (newImage.next() != null) {
     539                    nextButton.setEnabled(true);
     540                }
     541                if (newImage.previous() != null) {
     542                    previousButton.setEnabled(true);
     543                }
     544        }
    543545                updateImage();
    544546        }
Note: See TracChangeset for help on using the changeset viewer.