From: Brian Date: Wed, 7 Mar 2007 15:04:06 +0000 (-0700) Subject: check for null program ptrs in _mesa_uniform() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cec81eef313cea94ffdbd8e62c18ff8d3f651dbd;p=mesa.git check for null program ptrs in _mesa_uniform() --- 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); } }