Index: trunk/src/org/openstreetmap/josm/data/osm/Relation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 3106)
+++ trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 3107)
@@ -334,11 +334,15 @@
     @Override
     public BBox getBBox() {
-        if (bbox == null) {
-            calculateBBox(new HashSet<PrimitiveId>());
+        if (getDataSet() == null)
+            return calculateBBox(new HashSet<PrimitiveId>());
+        else {
             if (bbox == null) {
-                bbox = new BBox(0, 0, 0, 0); // No members
-            }
-        }
-        return  bbox;
+                bbox = calculateBBox(new HashSet<PrimitiveId>());
+                if (bbox == null) {
+                    bbox = new BBox(0, 0, 0, 0); // No members
+                }
+            }
+            return  bbox;
+        }
     }
 
@@ -374,4 +378,5 @@
         super.setDataset(dataSet);
         checkMembers();
+        bbox = null; // bbox might have changed if relation was in ds, was removed, modified, added back to dataset
     }
 
@@ -401,5 +406,5 @@
     /**
      * Replies true if at least one child primitive is incomplete
-     * 
+     *
      * @return true if at least one child primitive is incomplete
      */
@@ -414,5 +419,5 @@
      * Replies a collection with the incomplete children this relation
      * refers to
-     * 
+     *
      * @return the incomplete children. Empty collection if no children are incomplete.
      */
