Changeset 8645 in josm


Ignore:
Timestamp:
2015-08-07T17:15:58+02:00 (9 years ago)
Author:
Don-vip
Message:

fix #11756, fix #11759 - NPEs

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r8513 r8645  
    824824        double baseHdg = -1;
    825825        if (previousNode != null) {
    826             baseHdg =  Math.toDegrees(previousNode.getEastNorth()
    827                     .heading(getCurrentBaseNode().getEastNorth()));
     826            EastNorth en = previousNode.getEastNorth();
     827            if (en != null) {
     828                baseHdg = Math.toDegrees(en.heading(getCurrentBaseNode().getEastNorth()));
     829            }
    828830        }
    829831
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r8510 r8645  
    155155            case CANCEL:
    156156                if (yLayer != null) {
    157                     for (ImageEntry ie : yLayer.data) {
    158                         ie.tmp = null;
     157                    if (yLayer.data != null) {
     158                        for (ImageEntry ie : yLayer.data) {
     159                            ie.tmp = null;
     160                        }
    159161                    }
    160162                    yLayer.updateBufferAndRepaint();
Note: See TracChangeset for help on using the changeset viewer.