diff options
author | Sven Gothel <[email protected]> | 2012-06-28 21:46:10 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-06-28 21:46:10 +0200 |
commit | 4f27bcecf7484dc041551f52a5c49e2884cb3867 (patch) | |
tree | 5fd9341f357ca56fdee2261998b7531b0781e3e8 /src/jogl/classes/com | |
parent | 3334a924309a9361a448d69bc707d4cce416b430 (diff) |
AWT/SWT GLCanvas: Remove volatile of context instance, use drawable instance's volatile 'feature'
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java index 7e1b69823..920e63421 100644 --- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java +++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java @@ -109,7 +109,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable { /* GL Stuff */ private final GLDrawableHelper drawableHelper = new GLDrawableHelper(); private volatile GLDrawable drawable; // volatile avoids locking all accessors. FIXME still need to sync destroy/display - private volatile GLContext context; // volatile avoids locking all accessors. FIXME still need to sync destroy/display + private GLContext context; /* Native window surface */ private AbstractGraphicsDevice device; @@ -454,7 +454,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable { @Override public void dispose() { - if (null != context) { + if (null != drawable && null != context) { // drawable is volatile! boolean animatorPaused = false; final GLAnimatorControl animator = getAnimator(); if (null != animator) { |