diff options
Diffstat (limited to 'src/net/java/games/jogl')
-rw-r--r-- | src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java index a4f588158..726091bf1 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java +++ b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java @@ -263,7 +263,9 @@ public class WindowsGLContextFactory extends GLContextFactory { public void run() { // Create a native window and device context - HWND = WGL.CreateDummyWindow( rectangle.x, rectangle.y, rectangle.width, rectangle.height ); + synchronized (WindowsGLContextFactory.class) { + HWND = WGL.CreateDummyWindow( rectangle.x, rectangle.y, rectangle.width, rectangle.height ); + } HDC = WGL.GetDC( HWND ); // Start the message pump at shutdown |