Ticket #2168: Fix Exception.patch

File Fix Exception.patch, 1.8 KB (added by xeen, 16 years ago)
  • src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

     
    214214     * redraw to (possibly) get rid of helper line if selection changes.
    215215     */
    216216    public void eventDispatched(AWTEvent event) {
    217         if(!Main.map.mapView.isDrawableLayer())
     217        if(Main.map == null ||Main.map.mapView == null || !Main.map.mapView.isDrawableLayer())
    218218            return;
    219219        InputEvent e = (InputEvent) event;
    220220        ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
     
    531531            currentBaseNode = null;
    532532            return;
    533533        }
    534 
     534       
    535535        double distance = -1;
    536536        double angle = -1;
    537537
  • src/org/openstreetmap/josm/gui/NavigatableComponent.java

     
    33package org.openstreetmap.josm.gui;
    44
    55import java.awt.Point;
     6import java.util.ArrayList;
    67import java.util.Collection;
    78import java.util.Collections;
    89import java.util.HashSet;
     10import java.util.LinkedList;
     11import java.util.List;
    912import java.util.TreeMap;
    10 import java.util.List;
    11 import java.util.ArrayList;
    12 import java.util.LinkedList;
    1313
    1414import javax.swing.JComponent;
    1515
     
    4545    /**
    4646     * Center n/e coordinate of the desired screen center.
    4747     */
    48     protected EastNorth center;
     48    protected EastNorth center = new EastNorth(0, 0);
    4949
    5050    public NavigatableComponent() {
    5151        setLayout(null);