diff options
author | Sven Gothel <[email protected]> | 2012-10-08 02:03:00 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-08 02:03:00 +0200 |
commit | d4114a6142e8d71ccd342ca61b1b73a1ee48411b (patch) | |
tree | d4e769bc6d3853955a2825dcb897a076f6103c69 /src/jogl/classes/javax/media | |
parent | 455fed40391afe10ce5ffb9146ca325af63b0a49 (diff) |
Refine GLDrawable.swapBuffer() fix (AWT/SWT GLCanvas and GLAutoDrawableBase) of commit 455fed40391afe10ce5ffb9146ca325af63b0a49
Add drawable null check before using.
Diffstat (limited to 'src/jogl/classes/javax/media')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 4 |
1 files changed, 3 insertions, 1 deletions
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(); } |