aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/renderer/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs
index bb025875..0b8dbd13 100644
--- a/src/renderer/mod.rs
+++ b/src/renderer/mod.rs
@@ -1078,10 +1078,10 @@ impl ShaderProgram {
let mut success: GLint = 0;
gl::GetProgramiv(program, gl::LINK_STATUS, &mut success);
- if success != (gl::TRUE as GLint) {
- Err(ShaderCreationError::Link(get_program_info_log(program)))
- } else {
+ if success == (gl::TRUE as GLint) {
Ok(program)
+ } else {
+ Err(ShaderCreationError::Link(get_program_info_log(program)))
}
}
}