diff options
author | Sven Gothel <[email protected]> | 2010-04-28 07:05:07 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-28 07:05:07 +0200 |
commit | 9346e4f91dc468730efac8ad6f1d9d8024e8e93b (patch) | |
tree | 756d532b60ee805c87833105e6ae0a43536c1a06 /src/jogl/classes/com/jogamp/opengl/impl | |
parent | e5720ee629fba06bc266265b42eb559150f7d7a3 (diff) |
Fix privileged access (applet)
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java index 8f0299c1c..50e2edddb 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java @@ -45,6 +45,7 @@ import javax.media.opengl.*; import com.jogamp.common.util.*; import com.jogamp.gluegen.runtime.*; import java.lang.reflect.*; +import java.security.*; /** Extends GLDrawableFactory with a few methods for handling typically software-accelerated offscreen rendering (Device @@ -185,7 +186,12 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory { } }); } - Runtime.getRuntime().addShutdownHook(factoryShutdownHook); + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + Runtime.getRuntime().addShutdownHook(factoryShutdownHook); + return null; + } + }); factoryShutdownHookRegistered = true; } |