Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 29595)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 29601)
@@ -169,5 +169,6 @@
                 new SavePictureCalibrationAction((PicLayerAbstract) arg0).actionPerformed(null);
         }
-        boolean enable = Main.map.mapView.getAllLayers().size() != 0;
+        // Why should I do all these checks now?
+        boolean enable = Main.map != null && Main.map.mapView != null && Main.map.mapView.getAllLayers() != null && Main.map.mapView.getAllLayers().size() != 0;
         menu.setEnabled(enable);
     }
