Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 1429)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 1430)
@@ -215,5 +215,5 @@
      */
     public void eventDispatched(AWTEvent event) {
-        if(!Main.map.mapView.isDrawableLayer())
+        if(Main.map == null ||Main.map.mapView == null || !Main.map.mapView.isDrawableLayer())
             return;
         InputEvent e = (InputEvent) event;
@@ -532,5 +532,5 @@
             return;
         }
-
+        
         double distance = -1;
         double angle = -1;
Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 1429)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 1430)
@@ -4,11 +4,11 @@
 
 import java.awt.Point;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
 import java.util.TreeMap;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.LinkedList;
 
 import javax.swing.JComponent;
@@ -46,5 +46,5 @@
      * Center n/e coordinate of the desired screen center.
      */
-    protected EastNorth center;
+    protected EastNorth center = new EastNorth(0, 0);
 
     public NavigatableComponent() {
