Ignore:
Timestamp:
2018-03-10T17:47:43+01:00 (21 months ago)
Author:
Don-vip
Message:

fix #16072 - add robustness in ImproveWayAccuracy map mode

File:
1 edited

Legend:

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

    r13434 r13512  
    4949import org.openstreetmap.josm.gui.util.ModifierExListener;
    5050import org.openstreetmap.josm.tools.ImageProvider;
     51import org.openstreetmap.josm.tools.Logging;
    5152import org.openstreetmap.josm.tools.Pair;
    5253import org.openstreetmap.josm.tools.Shortcut;
     
    255256            if (ctrl && candidateSegment != null) {
    256257                g.setStroke(ADD_NODE_STROKE.get());
    257                 p1 = candidateSegment.getFirstNode();
    258                 p2 = candidateSegment.getSecondNode();
     258                try {
     259                    p1 = candidateSegment.getFirstNode();
     260                    p2 = candidateSegment.getSecondNode();
     261                } catch (ArrayIndexOutOfBoundsException e) {
     262                    Logging.error(e);
     263                }
    259264            } else if (!alt && !ctrl && candidateNode != null) {
    260265                g.setStroke(MOVE_NODE_STROKE.get());
Note: See TracChangeset for help on using the changeset viewer.