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 2d42fafd88e693a4ea22c8165537c219544c5f78..77e105115c80eaef7d64bb2b5288a896b594e3df 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);   
 }