Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java	(revision 29934)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java	(revision 30145)
@@ -32,20 +32,12 @@
     }
 
-    /* (non-Javadoc)
-     * @see java.util.TimerTask#run()
-     */
     @Override
     public void run() {
-        if(Main.map == null || Main.map.mapView == null || Main.map.mapView.getEditLayer() == null) {
+        OsmDataLayer layer = Main.main.getEditLayer();
+        if (layer == null) {
             return;
         }
-        OsmDataLayer layer = Main.map.mapView.getEditLayer();
         try {
             DataSet dataset = layer.data;
-
-//            File outFile = layer.associatedFile;
-//            if(outFile == null) {
-//                outFile = file;
-//            }
 
             // write to temporary file, on success, rename tmp file to target file:
@@ -69,5 +61,3 @@
         }
     }
-
-
 }
