Index: applications/editors/josm/plugins/smed/src/smed/Smed.java
===================================================================
--- applications/editors/josm/plugins/smed/src/smed/Smed.java	(revision 24416)
+++ applications/editors/josm/plugins/smed/src/smed/Smed.java	(revision 24559)
@@ -155,4 +155,11 @@
             smedTab.closeDialog();
         }
+        
+        if(Main.map != null) {
+        	// von SmedTabbedPane nach hier verlagert, damit sicher ist Main.map != null
+        	SmedPluggable p = SmedTabbedPane.getCurPlugin();
+        	
+        	if(p != null) p.hasFocus();        	
+        }
     }
 
Index: applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabbedPane.java
===================================================================
--- applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabbedPane.java	(revision 24416)
+++ applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabbedPane.java	(revision 24559)
@@ -34,4 +34,5 @@
 	private SmedPluginManager manager = null;
 	private int activeIndex = -1;
+	static private SmedPluggable curPlugin = null;
 	
     public SmedTabbedPane() {
@@ -64,5 +65,5 @@
             			tabbedPane.setMnemonicAt(i, KeyEvent.VK_1 + i);
             			if(i == 0) { 
-            				p.hasFocus();
+            				curPlugin = p;
             				activeIndex = 0;
             			}
@@ -94,5 +95,8 @@
 						activeIndex = pane.getSelectedIndex();
 						for(SmedPluggable p : plugins) {
-							if(p.getIndex() == activeIndex) p.hasFocus();
+							if(p.getIndex() == activeIndex) { 
+								p.hasFocus();
+								curPlugin = p;
+							}
 						}
 					}
@@ -108,3 +112,4 @@
     public static List<SmedPluggable> getPlugins() { return plugins; }
     public static JTabbedPane getTabbedPane() { return tabbedPane; }
+    public static SmedPluggable getCurPlugin() { return curPlugin; }
 }
