main: Clean up a strange construction in use_shader_program().
authorPaul Berry <stereotype441@gmail.com>
Fri, 10 Jan 2014 14:35:09 +0000 (06:35 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 19 Mar 2015 20:38:51 +0000 (13:38 -0700)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/main/shaderapi.c

index 3ea76af25d567d7c8b9e74f35c508ba1a004c4bc..6e736847c3a7b527a5f726a53de4d3c9d7f08d29 100644 (file)
@@ -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) {