Ticket #2168: Fix Exception.patch
File Fix Exception.patch, 1.8 KB (added by , 16 years ago) |
---|
-
src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
214 214 * redraw to (possibly) get rid of helper line if selection changes. 215 215 */ 216 216 public void eventDispatched(AWTEvent event) { 217 if( !Main.map.mapView.isDrawableLayer())217 if(Main.map == null ||Main.map.mapView == null || !Main.map.mapView.isDrawableLayer()) 218 218 return; 219 219 InputEvent e = (InputEvent) event; 220 220 ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0; … … 531 531 currentBaseNode = null; 532 532 return; 533 533 } 534 534 535 535 double distance = -1; 536 536 double angle = -1; 537 537 -
src/org/openstreetmap/josm/gui/NavigatableComponent.java
3 3 package org.openstreetmap.josm.gui; 4 4 5 5 import java.awt.Point; 6 import java.util.ArrayList; 6 7 import java.util.Collection; 7 8 import java.util.Collections; 8 9 import java.util.HashSet; 10 import java.util.LinkedList; 11 import java.util.List; 9 12 import java.util.TreeMap; 10 import java.util.List;11 import java.util.ArrayList;12 import java.util.LinkedList;13 13 14 14 import javax.swing.JComponent; 15 15 … … 45 45 /** 46 46 * Center n/e coordinate of the desired screen center. 47 47 */ 48 protected EastNorth center ;48 protected EastNorth center = new EastNorth(0, 0); 49 49 50 50 public NavigatableComponent() { 51 51 setLayout(null);