diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 51201b3a9..ff1b65520 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -164,7 +164,7 @@ public abstract class GLContextImpl extends GLContext { if(null!=read && drawable!=read && !isGLReadDrawableAvailable()) { throw new GLException("GL Read Drawable not available"); } - boolean lockHeld = lock.isOwner(); + final boolean lockHeld = lock.isOwner(Thread.currentThread()); if(lockHeld) { release(); } @@ -224,8 +224,8 @@ public abstract class GLContextImpl extends GLContext { if(TRACE_SWITCH) { System.err.println(getThreadName() +": GLContext.ContextSwitch: - release() - force: "+force+", "+lock); } - if ( !lock.isOwner() ) { - throw new GLException("Context not current on current thread "+Thread.currentThread().getName()+": "+this); + if ( !lock.isOwner(Thread.currentThread()) ) { + throw new GLException("Context not current on current thread "+Thread.currentThread().getName()+": "+this); } final boolean actualRelease = force || lock.getHoldCount() == 1 ; try { |