Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 5261)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 5262)
@@ -185,5 +185,5 @@
 
     /**
-     * Wheather or not the java vm is openjdk
+     * Whether or not the java vm is openjdk
      * We use this to work around openjdk bugs
      */
@@ -359,5 +359,5 @@
      * Add a new layer to the map. If no map exists, create one.
      */
-    public final void addLayer(final Layer layer) {
+    public final synchronized void addLayer(final Layer layer) {
         if (map == null) {
             final MapFrame mapFrame = new MapFrame(contentPanePrivate);
