more idiomatic error reporting

This commit is contained in:
faiface 2016-11-25 18:11:38 +01:00
parent ee9c6a6b6e
commit f7c4a6e1ad
1 changed files with 3 additions and 3 deletions

View File

@ -160,8 +160,8 @@ func getLastGLErr() error {
for e := gl.GetError(); e != gl.NO_ERROR; e = gl.GetError() { for e := gl.GetError(); e != gl.NO_ERROR; e = gl.GetError() {
err = e err = e
} }
if err == gl.NO_ERROR { if err != gl.NO_ERROR {
return nil
}
return GLError(err) return GLError(err)
} }
return nil
}