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 | |
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')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 2 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index a0027f308..e279c0423 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -811,7 +811,7 @@ public abstract class GLContextImpl extends GLContext { if(PROFILE_ALIASING) { hasGL3 = true; } - resetStates(); // clean this context states, since creation was temporary + resetStates(); // clean context states, since creation was temporary } } if(!hasGL3) { 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:"); |