Fixed optional error check.

This commit is contained in:
Ioannis Tsakpinis 2014-09-13 12:39:54 +03:00
parent 46f602f0c6
commit f05778f073
1 changed files with 5 additions and 1 deletions

View File

@ -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();