diff options
author | Sven Gothel <[email protected]> | 2013-02-20 21:52:42 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-02-20 21:52:42 +0100 |
commit | 10b4957dc36005453d2a4e7a3b4de4df20d0c901 (patch) | |
tree | 727b67777dac97a6b89239099a52791305a2aada /src/jogl/classes/jogamp/opengl/macosx | |
parent | 14b278536e6f8de2ee6254796b89bd27d5419b72 (diff) |
Fix NPE of Bug 679: The ctx was released w/o fully initialized (no proper ARB ctx of expected version ?)
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 9e0174595..dbb1d4931 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -793,7 +793,9 @@ public abstract class MacOSXCGLContext extends GLContextImpl @Override public boolean release(long ctx) { try { - gl.glFlush(); // w/o glFlush()/glFinish() OSX < 10.7 (NVidia driver) may freeze + if( null != MacOSXCGLContext.this.getGLProcAddressTable() ) { // gl successfully initialized ? + gl.glFlush(); // w/o glFlush()/glFinish() OSX < 10.7 (NVidia driver) may freeze + } } catch (GLException gle) { if(DEBUG) { System.err.println("MacOSXCGLContext.NSOpenGLImpl.release: INFO: glFlush() catched exception:"); |