diff dwtx/draw2d/ConnectionRouter.d @ 101:1082a0fc2bb8

First Draw2D example running
author Frank Benoit <benoit@tionex.de>
date Sun, 03 Aug 2008 02:17:46 +0200
parents 95307ad235d9
children
line wrap: on
line diff
--- a/dwtx/draw2d/ConnectionRouter.d	Sun Aug 03 00:54:29 2008 +0200
+++ b/dwtx/draw2d/ConnectionRouter.d	Sun Aug 03 02:17:46 2008 +0200
@@ -88,12 +88,20 @@
     }
 }
 
+
 /**
  * The default router for Connections.
  */
-public static const ConnectionRouter ConnectionRouter_NULL;
-
-static this(){
-    ConnectionRouter_NULL = new NullConnectionRouter();
+private static NullConnectionRouter ConnectionRouter_NULL_;
+public static NullConnectionRouter ConnectionRouter_NULL(){
+    if( ConnectionRouter_NULL_ is null ){
+        synchronized( NullConnectionRouter.classinfo ){
+            if( ConnectionRouter_NULL_ is null ){
+                ConnectionRouter_NULL_ = new NullConnectionRouter();
+            }
+        }
+    }
+    return ConnectionRouter_NULL_;
 }
 
+