aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java
index 4e97e37ce..e786dfde9 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java
@@ -164,6 +164,9 @@ public abstract class MacOSXCGLContext extends GLContextImpl
protected int makeCurrentImpl() throws GLException {
boolean created = false;
+ if (0 == drawable.getNativeWindow().getSurfaceHandle()) {
+ throw new GLException("drawable has invalid surface handle: "+drawable);
+ }
if ( 0 == cglContext && 0 == nsContext) {
create();
created = 0 != cglContext || 0 != nsContext ;