Index: /trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 11628)
+++ /trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 11629)
@@ -61,5 +61,5 @@
  *
  * Dataset is threadsafe - accessing Dataset simultaneously from different threads should never
- * lead to data corruption or ConccurentModificationException. However when for example one thread
+ * lead to data corruption or ConcurrentModificationException. However when for example one thread
  * removes primitive and other thread try to add another primitive referring to the removed primitive,
  * DataIntegrityException will occur.
@@ -966,5 +966,5 @@
 
     @Override
-    public Collection<DataSource> getDataSources() {
+    public synchronized Collection<DataSource> getDataSources() {
         return Collections.unmodifiableCollection(dataSources);
     }
@@ -1383,12 +1383,14 @@
         if (from != null) {
             new DataSetMerger(this, from).merge(progressMonitor);
-            if (!from.dataSources.isEmpty()) {
-                if (dataSources.addAll(from.dataSources)) {
-                    cachedDataSourceArea = null;
-                    cachedDataSourceBounds = null;
+            synchronized (from) {
+                if (!from.dataSources.isEmpty()) {
+                    if (dataSources.addAll(from.dataSources)) {
+                        cachedDataSourceArea = null;
+                        cachedDataSourceBounds = null;
+                    }
+                    from.dataSources.clear();
+                    from.cachedDataSourceArea = null;
+                    from.cachedDataSourceBounds = null;
                 }
-                from.dataSources.clear();
-                from.cachedDataSourceArea = null;
-                from.cachedDataSourceBounds = null;
             }
         }
@@ -1403,5 +1405,9 @@
     }
 
-    public ProjectionBounds getDataSourceBoundingBox() {
+    /**
+     * Returns the data sources bounding box.
+     * @return the data sources bounding box
+     */
+    public synchronized ProjectionBounds getDataSourceBoundingBox() {
         BoundingXYVisitor bbox = new BoundingXYVisitor();
         for (DataSource source : dataSources) {
@@ -1413,4 +1419,3 @@
         return null;
     }
-
 }
