Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 22813)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 22915)
@@ -50,4 +50,5 @@
  *
  * @author Radomír Černoch, radomir.cernoch@gmail.com
+ * @author Libor Pechacek, lpechacek@gmx.com
  */
 public class CzechAddressPlugin extends Plugin implements StatusListener {
@@ -150,7 +151,10 @@
                 reasoner.update(street);
 
-            for (OsmPrimitive prim : Main.main.getCurrentDataSet().allPrimitives()) {
-                if (House.isMatchable(prim) || Street.isMatchable(prim))
-                    reasoner.update(prim);
+            org.openstreetmap.josm.data.osm.DataSet dataSet = Main.main.getCurrentDataSet();
+            if (dataSet != null) {
+                for (OsmPrimitive prim : dataSet.allPrimitives()) {
+                    if (House.isMatchable(prim) || Street.isMatchable(prim))
+                        reasoner.update(prim);
+                }
             }
             reasoner.closeTransaction();
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java	(revision 22813)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java	(revision 22915)
@@ -43,5 +43,7 @@
      */
     public void actionPerformed(ActionEvent e) {
-        Collection<OsmPrimitive> data = Main.main.getCurrentDataSet().getSelected();
+        org.openstreetmap.josm.data.osm.DataSet dataSet = Main.main.getCurrentDataSet();
+        if (dataSet == null) return;
+        Collection<OsmPrimitive> data = dataSet.getSelected();
 
         if (data.size() != 1) return;
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 22813)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 22915)
@@ -87,5 +87,8 @@
 
         BoundingXYVisitor visitor = new BoundingXYVisitor();
-        for (OsmPrimitive op : Main.main.getCurrentDataSet().allPrimitives()) {
+        org.openstreetmap.josm.data.osm.DataSet dataSet = Main.main.getCurrentDataSet();
+        if (dataSet == null) return;
+
+        for (OsmPrimitive op : dataSet.allPrimitives()) {
             if (op instanceof Node) {
                 ((Node) op).visit(visitor);
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.form
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.form	(revision 22813)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.form	(revision 22915)
@@ -50,9 +50,9 @@
                   <Group type="103" groupAlignment="0" attributes="0">
                       <Group type="102" alignment="1" attributes="0">
-                          <EmptySpace pref="267" max="32767" attributes="0"/>
+                          <EmptySpace pref="260" max="32767" attributes="0"/>
                           <Component id="renamerButton" min="-2" max="-2" attributes="0"/>
                           <EmptySpace max="-2" attributes="0"/>
                       </Group>
-                      <Component id="streetScrollPane" alignment="0" pref="426" max="32767" attributes="0"/>
+                      <Component id="streetScrollPane" alignment="0" pref="422" max="32767" attributes="0"/>
                   </Group>
                 </DimensionLayout>
@@ -60,5 +60,5 @@
                   <Group type="103" groupAlignment="0" attributes="0">
                       <Group type="102" alignment="1" attributes="0">
-                          <Component id="streetScrollPane" pref="342" max="32767" attributes="0"/>
+                          <Component id="streetScrollPane" pref="334" max="32767" attributes="0"/>
                           <EmptySpace max="-2" attributes="0"/>
                           <Component id="renamerButton" min="-2" max="-2" attributes="0"/>
@@ -114,7 +114,7 @@
                 <DimensionLayout dim="0">
                   <Group type="103" groupAlignment="0" attributes="0">
-                      <Component id="jScrollPane1" alignment="0" pref="426" max="32767" attributes="0"/>
+                      <Component id="jScrollPane1" alignment="0" pref="422" max="32767" attributes="0"/>
                       <Group type="102" alignment="1" attributes="0">
-                          <EmptySpace pref="363" max="32767" attributes="0"/>
+                          <EmptySpace pref="352" max="32767" attributes="0"/>
                           <Component id="dbEditButton" min="-2" max="-2" attributes="0"/>
                           <EmptySpace max="-2" attributes="0"/>
@@ -125,5 +125,5 @@
                   <Group type="103" groupAlignment="0" attributes="0">
                       <Group type="102" alignment="1" attributes="0">
-                          <Component id="jScrollPane1" pref="342" max="32767" attributes="0"/>
+                          <Component id="jScrollPane1" pref="334" max="32767" attributes="0"/>
                           <EmptySpace max="-2" attributes="0"/>
                           <Component id="dbEditButton" min="-2" max="-2" attributes="0"/>
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java	(revision 22813)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java	(revision 22915)
@@ -32,4 +32,5 @@
  *
  * @author Radomír Černoch radomir.cernoch@gmail.com
+ * @author Libor Pechacek, lpechacek@gmx.com
  */
 public class ManagerDialog extends ExtendedDialog {
@@ -46,17 +47,19 @@
         dbEditButton.setIcon(ImageProvider.get("actions", "edit.png"));
 
-        Capitalizator cap = new Capitalizator(
-                                Main.main.getCurrentDataSet().allPrimitives(),
-                                CzechAddressPlugin.getLocation().getStreets());
-
-        for (Street capStreet : cap.getCapitalised()) {
-            assert cap.translate(capStreet).get("name") != null : capStreet;
-
-            String elemName = capStreet.getName();
-            String primName = cap.translate(capStreet).get("name");
-
-            if (!elemName.equals(primName)) {
-                streetModel.elems.add(capStreet);
-                streetModel.names.add(primName);
+        org.openstreetmap.josm.data.osm.DataSet dataSet = Main.main.getCurrentDataSet();
+        if (dataSet != null) {
+            Capitalizator cap = new Capitalizator(dataSet.allPrimitives(),
+                                    CzechAddressPlugin.getLocation().getStreets());
+
+            for (Street capStreet : cap.getCapitalised()) {
+                assert cap.translate(capStreet).get("name") != null : capStreet;
+
+                String elemName = capStreet.getName();
+                String primName = cap.translate(capStreet).get("name");
+
+                if (!elemName.equals(primName)) {
+                    streetModel.elems.add(capStreet);
+                    streetModel.names.add(primName);
+                }
             }
         }
