From 57b2652322c833f9007203488526571023279cfc Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 10 Jan 2014 06:35:09 -0800 Subject: [PATCH] main: Clean up a strange construction in use_shader_program(). Reviewed-by: Jordan Justen --- src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 3ea76af25d5..6e736847c3a 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1035,7 +1035,7 @@ use_shader_program(struct gl_context *ctx, GLenum type, gl_shader_stage stage = _mesa_shader_enum_to_shader_stage(type); target = &shTarget->CurrentProgram[stage]; - if ((shProg == NULL) || (shProg->_LinkedShaders[stage] == NULL)) + if ((shProg != NULL) && (shProg->_LinkedShaders[stage] == NULL)) shProg = NULL; if (*target != shProg) { -- 2.30.2