From: Paul Berry Date: Fri, 10 Jan 2014 14:35:09 +0000 (-0800) Subject: main: Clean up a strange construction in use_shader_program(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57b2652322c833f9007203488526571023279cfc;p=mesa.git main: Clean up a strange construction in use_shader_program(). Reviewed-by: Jordan Justen --- 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) {