From d4114a6142e8d71ccd342ca61b1b73a1ee48411b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 8 Oct 2012 02:03:00 +0200 Subject: Refine GLDrawable.swapBuffer() fix (AWT/SWT GLCanvas and GLAutoDrawableBase) of commit 455fed40391afe10ce5ffb9146ca325af63b0a49 Add drawable null check before using. --- src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/com') 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(); } -- cgit v1.2.3