Index: /applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java
===================================================================
--- /applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java	(revision 19942)
+++ /applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java	(revision 19943)
@@ -96,8 +96,15 @@
         }
 
-        if (prim instanceof Node)
-            result += " " + StringUtils.latLonToString(((Node) prim).getCoor());
-        else if (prim instanceof Way)
-            result += " " + StringUtils.latLonToString(((Way) prim).firstNode().getCoor());
+        if (prim instanceof Node) {
+            Node node = (Node) prim;
+            result += " " + StringUtils.latLonToString(node.getCoor());
+            
+        } else if (prim instanceof Way) {
+            Way way = (Way) prim;
+            if (way.getNodesCount() > 0)
+                result += " " + StringUtils.latLonToString(way.firstNode().getCoor());
+            else
+                result += " empty way";
+        }
 
         if (prim.isDeleted())
