Fixed optional error check.
This commit is contained in:
parent
46f602f0c6
commit
f05778f073
|
@ -253,8 +253,12 @@ final class ContextGL implements Context {
|
|||
boolean was_current = isCurrent();
|
||||
int error = GL_NO_ERROR;
|
||||
if ( was_current ) {
|
||||
if ( GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGL11 )
|
||||
try {
|
||||
// May fail on GLContext.getCapabilities()
|
||||
error = glGetError();
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
releaseCurrent();
|
||||
}
|
||||
checkDestroy();
|
||||
|
|
Loading…
Reference in New Issue