diff options
author | Brian Paul <[email protected]> | 2008-05-16 10:49:44 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-16 15:16:06 -0600 |
commit | f2632212ad7735c659331b65d3bfe14aef0faccb (patch) | |
tree | 2cf36bb5d6438ab6e644b677ac11f50fd11dabd1 /src/mesa/shader/shader_api.c | |
parent | e291cf6f8d3423c2f1e123ec2a42f0568019da80 (diff) |
silence warning, new assertion
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r-- | src/mesa/shader/shader_api.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 08fa9a7e233..61d51c3871d 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -942,7 +942,7 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, if (shProg) { if (location < shProg->Uniforms->NumUniforms) { GLint progPos, i; - const struct gl_program *prog; + const struct gl_program *prog = NULL; progPos = shProg->Uniforms->Uniforms[location].VertPos; if (progPos >= 0) { @@ -955,8 +955,11 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, } } - for (i = 0; i < prog->Parameters->Parameters[progPos].Size; i++) { - params[i] = prog->Parameters->ParameterValues[progPos][i]; + ASSERT(prog); + if (prog) { + for (i = 0; i < prog->Parameters->Parameters[progPos].Size; i++) { + params[i] = prog->Parameters->ParameterValues[progPos][i]; + } } } else { |