diff options
Diffstat (limited to 'src/mesa/main/shaderobj.c')
-rw-r--r-- | src/mesa/main/shaderobj.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index b6594cbe6f0..216bbce0032 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -291,6 +291,7 @@ _mesa_free_shader_program_data(struct gl_context *ctx, struct gl_shader_program *shProg) { GLuint i; + gl_shader_type sh; assert(shProg->Type == GL_SHADER_PROGRAM_MESA); @@ -326,10 +327,10 @@ _mesa_free_shader_program_data(struct gl_context *ctx, shProg->TransformFeedback.NumVarying = 0; - for (i = 0; i < MESA_SHADER_TYPES; i++) { - if (shProg->_LinkedShaders[i] != NULL) { - ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[i]); - shProg->_LinkedShaders[i] = NULL; + for (sh = 0; sh < MESA_SHADER_TYPES; sh++) { + if (shProg->_LinkedShaders[sh] != NULL) { + ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[sh]); + shProg->_LinkedShaders[sh] = NULL; } } } |