From d39760d71869b96140f7ac82b1029d0a3b79aae4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 15 Jul 2005 22:48:09 +0000 Subject: [PATCH] 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. --- src/mesa/tnl/t_vb_arbprogram.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index fd7ffcd84c8..c55fc84feaa 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; } } -- 2.30.2