From 97b817685af3fcb67f02ddd50f87627b97dd3e5b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 22 Dec 2012 07:18:30 +0100 Subject: Bug 642 / Refine 1ae0737f34143a5ed655bd9c4d5fe9b0437c7774: GLCanvas.displayOnEDT: Also check null!=drawable As for 1ae0737f34143a5ed655bd9c4d5fe9b0437c7774, an animator may inject a display Runnable on the EDT before AWT destruction. In case this Runnable is executed after destruction on the EDT - it would fail. --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index 3877a7997..efdc69ed8 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -1024,7 +1024,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing final RecursiveLock _lock = lock; _lock.lock(); try { - if( drawable.isRealized() ) { + if( null != drawable && drawable.isRealized() ) { helper.invokeGL(drawable, context, displayAction, initAction); } } finally { @@ -1039,7 +1039,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing final RecursiveLock _lock = lock; _lock.lock(); try { - if(null != drawable && drawable.isRealized() ) { + if( null != drawable && drawable.isRealized() ) { drawable.swapBuffers(); } } finally { -- cgit v1.2.3