From: Brian Paul Date: Fri, 15 Jul 2005 22:48:09 +0000 (+0000) Subject: Check for null program->Parameters pointer in validate_vertex_program(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d39760d71869b96140f7ac82b1029d0a3b79aae4;p=mesa.git 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. --- 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; } }