diff options
-rw-r--r-- | src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java index 6603dc2eb..0f4b1d03c 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java +++ b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java @@ -40,10 +40,11 @@ package net.java.games.jogl.impl.windows; import java.awt.Component; -import java.awt.Frame; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.Rectangle; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -70,7 +71,12 @@ public class WindowsGLContextFactory extends GLContextFactory { private static Set/*<GraphicsDevice >*/ pendingContextSet = new HashSet(); public WindowsGLContextFactory() { - Runtime.getRuntime().addShutdownHook( new ShutdownHook() ); + AccessController.doPrivileged( new PrivilegedAction() { + public Object run() { + Runtime.getRuntime().addShutdownHook( new ShutdownHook() ); + return( null ); + } + }); } public GraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities, |