From 675ee156d70463f25c766e13547e0c22f19e3eac Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 3 Oct 2009 22:41:12 -0700 Subject: Avoid NPE if no context current --- src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java index 020bea9f0..865abe09f 100644 --- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java +++ b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java @@ -78,7 +78,7 @@ public abstract class GLDrawableImpl implements GLDrawable { } } else { GLContext ctx = GLContext.getCurrent(); - if(ctx.getGLDrawable()==this) { + if(null!=ctx && ctx.getGLDrawable()==this) { ctx.getGL().glFinish(); } } -- cgit v1.2.3