From: Keith Whitwell Date: Mon, 5 Dec 2005 11:44:09 +0000 (+0000) Subject: Add guard before calling ctx->Driver.BindProgram X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4ebb682027e42c1f6525d0f8cee9ccd41e15ca0;p=mesa.git Add guard before calling ctx->Driver.BindProgram --- diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 2d42fafd88e..77e105115c8 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -1536,7 +1536,8 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ) /* Tell the driver about the change. Could define a new target for * this? */ - if (ctx->VertexProgram._Current != prev) + if (ctx->VertexProgram._Current != prev && + ctx->Driver.BindProgram) ctx->Driver.BindProgram(ctx, GL_VERTEX_PROGRAM_ARB, (struct program *) ctx->VertexProgram._Current); }