diff options
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java | 4 | ||||
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 4 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java index 73d3cd01e..33322628d 100644 --- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java +++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java @@ -159,7 +159,9 @@ public class GLCanvas extends Canvas implements GLAutoDrawable { final RecursiveLock _lock = lock; _lock.lock(); try { - drawable.swapBuffers(); + if(null != drawable) { + drawable.swapBuffers(); + } } finally { _lock.unlock(); } diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index ed069bf22..31c91e046 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -1004,7 +1004,9 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing final RecursiveLock _lock = lock; _lock.lock(); try { - drawable.swapBuffers(); + if(null != drawable) { + drawable.swapBuffers(); + } } finally { _lock.unlock(); } diff --git a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java index 42e14366c..057f28487 100644 --- a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java +++ b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java @@ -249,7 +249,9 @@ public abstract class GLAutoDrawableBase implements GLAutoDrawable, FPSCounter { final RecursiveLock _lock = getLock(); _lock.lock(); try { - drawable.swapBuffers(); + if(null != drawable) { + drawable.swapBuffers(); + } } finally { _lock.unlock(); } |