Add guard before calling ctx->Driver.BindProgram
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 5 Dec 2005 11:44:09 +0000 (11:44 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 5 Dec 2005 11:44:09 +0000 (11:44 +0000)
src/mesa/tnl/t_vp_build.c

index 2d42faf..77e1051 100644 (file)
@@ -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);   
 }