aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-08 02:03:00 +0200
committerSven Gothel <[email protected]>2012-10-08 02:03:00 +0200
commitd4114a6142e8d71ccd342ca61b1b73a1ee48411b (patch)
treed4e769bc6d3853955a2825dcb897a076f6103c69 /src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
parent455fed40391afe10ce5ffb9146ca325af63b0a49 (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/jogamp/opengl/GLAutoDrawableBase.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java4
1 files changed, 3 insertions, 1 deletions
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();
}