diff options
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt/GLCanvas.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index 9932f0cf9..be42e1da1 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -320,11 +320,13 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable { // The user really should not be invoking remove() from this // thread -- but since he/she is, we can not go over to the // EDT at this point. Try to destroy the context from here. - drawableHelper.invokeGL(drawable, context, disposeAction, null); - } else { + if(context.isCreated()) { + drawableHelper.invokeGL(drawable, context, disposeAction, null); + } + } else if(context.isCreated()) { Threading.invokeOnOpenGLThread(disposeOnEventDispatchThreadAction); } - } else { + } else if(context.isCreated()) { drawableHelper.invokeGL(drawable, context, disposeAction, null); } |