summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-07-15 22:48:09 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-07-15 22:48:09 +0000
commitd39760d71869b96140f7ac82b1029d0a3b79aae4 (patch)
tree3bcffc1a240227a600f8729ecad00f0d6818d0b4
parentdf0350b7ec11ea0d130a8d29642f94c8512b29bc (diff)
Check for null program->Parameters pointer in validate_vertex_program().
GL_NV_vertex_program programs can't directly reference GL state so this pointer is always NULL.
-rw-r--r--src/mesa/tnl/t_vb_arbprogram.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c
index fd7ffcd84c..c55fc84fea 100644
--- a/src/mesa/tnl/t_vb_arbprogram.c
+++ b/src/mesa/tnl/t_vb_arbprogram.c
@@ -1354,7 +1354,11 @@ validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage )
*/
m->File[FILE_LOCAL_PARAM] = program->Base.LocalParams;
m->File[FILE_ENV_PARAM] = ctx->VertexProgram.Parameters;
- m->File[FILE_STATE_PARAM] = program->Parameters->ParameterValues;
+ /* GL_NV_vertex_programs can't reference GL state */
+ if (program->Parameters)
+ m->File[FILE_STATE_PARAM] = program->Parameters->ParameterValues;
+ else
+ m->File[FILE_STATE_PARAM] = NULL;
}
}