Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java	(revision 10368)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java	(revision 10722)
@@ -24,7 +24,16 @@
 	 */
 	public static JobDispatcher getInstance() {
-		if (instance == null)
+		// for speed reasons we check if the instance has been created
+		// one time before we enter the synchronized section...
+		if (instance != null)
+			return instance;
+		synchronized (JobDispatcher.class) {
+			// ... and for thread safety reasons one time inside the
+			// synchronized section.
+			if (instance != null)
+				return instance;
 			new JobDispatcher();
-		return instance;
+			return instance;
+		}
 	}
 
