Index: applications/editors/josm/plugins/seachart/src/render/Renderer.java
===================================================================
--- applications/editors/josm/plugins/seachart/src/render/Renderer.java	(revision 31028)
+++ applications/editors/josm/plugins/seachart/src/render/Renderer.java	(revision 31031)
@@ -195,6 +195,8 @@
 					git.nextEdge();
 					while (git.hasNode()) {
+						Snode node = git.next();
+						if (node == null) continue;
 						prev = next;
-						next = context.getPoint(git.next());
+						next = context.getPoint(node);
 						angle = Math.atan2(next.getY() - prev.getY(), next.getX() - prev.getX());
 						piv = true;
@@ -265,5 +267,7 @@
 				}
 				while (git.hasNode()) {
-					point = context.getPoint(git.next());
+					Snode node = git.next();
+					if (node == null) continue;
+					point = context.getPoint(node);
 					p.lineTo(point.getX(), point.getY());
 				}
@@ -343,5 +347,7 @@
 					p.moveTo(point.getX(), point.getY());
 					while (git.hasNode()) {
-						point = context.getPoint(git.next());
+						Snode node = git.next();
+						if (node == null) continue;
+						point = context.getPoint(node);
 						p.lineTo(point.getX(), point.getY());
 					}
@@ -492,6 +498,8 @@
 					git.nextEdge();
 					while (git.hasNode()) {
+						Snode node = git.next();
+						if (node == null) continue;
 						prev = next;
-						next = context.getPoint(git.next());
+						next = context.getPoint(node);
 						angle = Math.atan2(next.getY() - prev.getY(), next.getX() - prev.getX());
 						piv = true;
Index: applications/editors/josm/plugins/seachart/src/s57/S57map.java
===================================================================
--- applications/editors/josm/plugins/seachart/src/s57/S57map.java	(revision 31028)
+++ applications/editors/josm/plugins/seachart/src/s57/S57map.java	(revision 31031)
@@ -942,11 +942,10 @@
 				while (git.hasNode()) {
 					node = git.next();
-					if (node != null) {
-						llon = lon;
-						llat = lat;
-						lat = node.lat;
-						lon = node.lon;
-						sigma += (lon * Math.sin(llat)) - (llon * Math.sin(lat));
-					}
+					if (node == null) continue;
+					llon = lon;
+					llat = lat;
+					lat = node.lat;
+					lon = node.lon;
+					sigma += (lon * Math.sin(llat)) - (llon * Math.sin(lat));
 				}
 			}
@@ -1009,4 +1008,5 @@
 					while (git.hasNode()) {
 						Snode node = git.next();
+						if (node == null) continue;
 						lat = node.lat;
 						lon = node.lon;
@@ -1031,4 +1031,5 @@
 					while (git.hasNode()) {
 						Snode node = git.next();
+						if (node == null) continue;
 						lat = node.lat;
 						lon = node.lon;
