Index: /applications/editors/josm/plugins/seachart/src/s57/S57map.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/s57/S57map.java	(revision 30995)
+++ /applications/editors/josm/plugins/seachart/src/s57/S57map.java	(revision 30996)
@@ -757,10 +757,12 @@
 				git.nextEdge();
 				while (git.hasNode()) {
-					llon = lon;
-					llat = lat;
 					node = git.next();
-					lat = node.lat;
-					lon = node.lon;
-					sigma += (lon * Math.sin(llat)) - (llon * Math.sin(lat));
+					if (node != null) {
+						llon = lon;
+						llat = lat;
+						lat = node.lat;
+						lon = node.lon;
+						sigma += (lon * Math.sin(llat)) - (llon * Math.sin(lat));
+					}
 				}
 			}
@@ -794,5 +796,5 @@
 						lat = node.lat;
 						lon = node.lon;
-					} else {
+					} else if (node != null) {
 						llat = lat;
 						llon = lon;
Index: /applications/editors/josm/plugins/seachart/src/seachart/SeachartAction.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/seachart/SeachartAction.java	(revision 30995)
+++ /applications/editors/josm/plugins/seachart/src/seachart/SeachartAction.java	(revision 30996)
@@ -149,5 +149,5 @@
 				LatLon coor = node.getCoor();
 				if (coor != null) {
-					map.addNode(node.getUniqueId(), node.getCoor().lat(), node.getCoor().lon());
+					map.addNode(node.getUniqueId(), coor.lat(), coor.lon());
 					for (Entry<String, String> entry : node.getKeys().entrySet()) {
 						map.addTag(entry.getKey(), entry.getValue());
