diff options
author | Michael Bien <[email protected]> | 2010-06-10 14:28:03 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-06-10 14:28:03 +0200 |
commit | 2522d4f1ebffec030d7e8c3688e5f952c574c3d0 (patch) | |
tree | 81d631cb11dadc483a4615996dedf773eed083da /src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java | |
parent | 57d3d3f9f9475ae167cd9d33c9450eea66439fd2 (diff) | |
parent | 1d333a771ce0bc7c8594e21d031703f698f06a46 (diff) |
Merge branch 'master' of github.com:sgothel/jogl
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java index 7a4e84081..8cc12ca89 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java @@ -136,6 +136,9 @@ public class GLDrawableHelper { lastContext.release(); } + if(!context.isCreated() && null == initAction) { + throw new GLException("Context has to be created, but no initAction is given: "+context); + } int res = 0; try { res = context.makeCurrent(); @@ -154,7 +157,7 @@ public class GLDrawableHelper { System.err.println("GLDrawableHelper " + this + ".invokeGL(): Running runnable"); } runnable.run(); - if (autoSwapBufferMode) { + if (autoSwapBufferMode && null != initAction) { if (drawable != null) { drawable.swapBuffers(); } |