From cec81eef313cea94ffdbd8e62c18ff8d3f651dbd Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 08:04:06 -0700 Subject: [PATCH] check for null program ptrs in _mesa_uniform() --- src/mesa/shader/shader_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 48ba8b657a0..924c9d5e945 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -961,8 +961,10 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, } if (shProg->Uniforms->Parameters[location].Type == PROGRAM_SAMPLER) { - _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); - _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); + if (shProg->VertexProgram) + _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); + if (shProg->FragmentProgram) + _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); FLUSH_VERTICES(ctx, _NEW_TEXTURE); } } -- 2.30.2