Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java	(revision 7039)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java	(revision 7040)
@@ -18,4 +18,10 @@
     private final Rectangle clipBounds;
 
+    /**
+     * Constructs a new {@code LineClip}.
+     * @param p1 start point of the clipped line
+     * @param p2 end point of the clipped line
+     * @param clipBounds Clip bounds
+     */
     public LineClip(Point p1, Point p2, Rectangle clipBounds) {
         this.p1 = p1;
@@ -29,4 +35,7 @@
      */
     public boolean execute() {
+        if (clipBounds == null) {
+            return false;
+        }
         return cohenSutherland(p1.x, p1.y, p2.x, p2.y, clipBounds.x , clipBounds.y, clipBounds.x + clipBounds.width, clipBounds.y + clipBounds.height);
     }
@@ -35,6 +44,5 @@
      * @return start point of the clipped line
      */
-    public Point getP1()
-    {
+    public Point getP1() {
         return p1;
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 7039)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 7040)
@@ -1175,5 +1175,8 @@
         GeneralPath onewayArrowsCasing = showOneway ? new GeneralPath() : null;
         Rectangle bounds = g.getClipBounds();
-        bounds.grow(100, 100);                  // avoid arrow heads at the border
+        if (bounds != null) {
+            // avoid arrow heads at the border
+            bounds.grow(100, 100);
+        }
 
         double wayLength = 0;
