Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 2343)
@@ -70,4 +70,16 @@
 
 abstract public class Main {
+    
+    /**
+     * Replies true if JOSM currently displays a map view. False, if it doesn't, i.e. if
+     * it only shows the MOTD panel.
+     * 
+     * @return true if JOSM currently displays a map view
+     */
+    static public boolean isDisplayingMapView() {
+        if (map == null) return false;
+        if (map.mapView == null) return false;
+        return true;
+    }
     /**
      * Global parent component for all dialogs and message boxes
Index: /trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java	(revision 2343)
@@ -33,8 +33,5 @@
 
         protected boolean isActiveLayer(Layer layer) {
-            if (Main.map == null)
-                return false;
-            if (Main.map.mapView == null)
-                return false;
+            if (Main.isDisplayingMapView()) return false;
             return Main.map.mapView.getActiveLayer() == layer;
         }
Index: /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 2343)
@@ -181,6 +181,5 @@
         } else {
             setEnabled(
-                    Main.map != null
-                    && Main.map.mapView != null
+                    Main.isDisplayingMapView()
                     && Main.map.mapView.hasLayers()
             );
Index: /trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java	(revision 2343)
@@ -92,5 +92,5 @@
 
     public void actionPerformed(ActionEvent e) {
-        if (!isEnabled() || Main.map == null || Main.map.mapView == null)
+        if (!isEnabled() || ! Main.isDisplayingMapView())
             return;
         OsmDataLayer layer = Main.map.mapView.getEditLayer();
Index: /trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java	(revision 2343)
@@ -33,6 +33,5 @@
 
     protected GpxLayer getLayer() {
-        if (Main.map == null) return null;
-        if (Main.map.mapView == null) return null;
+        if (!Main.isDisplayingMapView()) return null;
         if (Main.map.mapView.getActiveLayer() == null) return null;
         Layer layer = Main.map.mapView.getActiveLayer();
@@ -95,7 +94,6 @@
     @Override
     protected void updateEnabledState() {
-        boolean check = Main.main != null
-        && Main.map != null
-        && Main.map.mapView !=null
+        boolean check =            
+        Main.isDisplayingMapView() 
         && Main.map.mapView.getActiveLayer() != null;
         if(!check) {
Index: /trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 2343)
@@ -36,5 +36,5 @@
     public boolean doSave() {
         Layer layer = null;
-        if (Main.map != null && (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer
+        if (Main.isDisplayingMapView() && (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer
                 || Main.map.mapView.getActiveLayer() instanceof GpxLayer)) {
             layer = Main.map.mapView.getActiveLayer();
Index: /trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java	(revision 2343)
@@ -20,5 +20,5 @@
 
     public void actionPerformed(ActionEvent e) {
-        if (Main.map == null) return;
+        if (!Main.isDisplayingMapView()) return;
         Main.map.mapView.zoomToFactor(0.9);
     }
@@ -27,6 +27,5 @@
     protected void updateEnabledState() {
         setEnabled(
-                Main.map != null
-                && Main.map.mapView != null
+                Main.isDisplayingMapView()
                 && Main.map.mapView.hasLayers()
         );
Index: /trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java	(revision 2343)
@@ -20,5 +20,5 @@
 
     public void actionPerformed(ActionEvent e) {
-        if (Main.map == null) return;
+        if (!Main.isDisplayingMapView()) return;
         Main.map.mapView.zoomToFactor(1/0.9);
     }
@@ -27,6 +27,5 @@
     protected void updateEnabledState() {
         setEnabled(
-                Main.map != null
-                && Main.map.mapView != null
+                Main.isDisplayingMapView()
                 && Main.map.mapView.hasLayers()
         );
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 2343)
@@ -87,5 +87,5 @@
         private Layer findMergeLayer() {
             boolean merge = Main.pref.getBoolean("download.gps.mergeWithLocal", false);
-            if (Main.map == null)
+            if (!Main.isDisplayingMapView())    
                 return null;
             Layer active = Main.map.mapView.getActiveLayer();
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 2343)
@@ -104,6 +104,5 @@
 
         protected OsmDataLayer getEditLayer() {
-            if (Main.map == null) return null;
-            if (Main.map.mapView == null) return null;
+            if (!Main.isDisplayingMapView()) return null;
             return Main.map.mapView.getEditLayer();
         }
@@ -111,6 +110,5 @@
         protected int getNumDataLayers() {
             int count = 0;
-            if (Main.map == null) return 0;
-            if (Main.map.mapView == null) return 0;
+            if (!Main.isDisplayingMapView()) return 0;
             Collection<Layer> layers = Main.map.mapView.getAllLayers();
             for (Layer layer : layers) {
@@ -123,6 +121,5 @@
 
         protected OsmDataLayer getFirstDataLayer() {
-            if (Main.map == null) return null;
-            if (Main.map.mapView == null) return null;
+            if (!Main.isDisplayingMapView()) return null;
             Collection<Layer> layers = Main.map.mapView.getAllLayersAsList();
             for (Layer layer : layers) {
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 2342)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 2343)
@@ -176,4 +176,7 @@
      */
     private void updateCursor(MouseEvent e, int modifiers) {
+        if (!Main.isDisplayingMapView()) {
+            return;
+        }
         if(!Main.map.mapView.isActiveLayerVisible() || e == null)
             return;
