aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java4
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java4
2 files changed, 4 insertions, 4 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) {
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index bdfa11959..71026a247 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -156,7 +156,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
private final GLDrawableHelper drawableHelper = new GLDrawableHelper();
private AWTGraphicsConfiguration awtConfig;
private volatile GLDrawable drawable; // volatile avoids locking all accessors. FIXME still need to sync destroy/display
- private volatile GLContextImpl context; // volatile avoids locking all accessors. FIXME still need to sync destroy/display
+ private GLContextImpl context;
private boolean sendReshape = false;
// copy of the cstr args, mainly for recreation
@@ -436,7 +436,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
Thread.dumpStack();
}
- if(null!=context) {
+ if(null!=drawable && null!=context) { // drawable is volatile!
boolean animatorPaused = false;
if(null!=animator) {
// can't remove us from animator for recreational addNotify()