recommit e731d8aafa98bbf9d30f83e65f28b7718be55834.
authorRoland Scheidegger <sroland@tungstengraphics.com>
Tue, 27 Mar 2007 17:32:32 +0000 (19:32 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Tue, 27 Mar 2007 17:33:34 +0000 (19:33 +0200)
This got lost with glsl-compiler-1 merge, it fixes segfaults when using
ATI_fragment_shader, which uses the ProgramStringNotify mechanism but doesn't
have a valid program pointer.

src/mesa/tnl/t_vb_arbprogram.c

index 425a8669948b114f0466a0bbb4277329ecdfa00a..f0e326f25c488e5858eef2e0aa5a38d5af9e1405 100644 (file)
@@ -1608,7 +1608,7 @@ const struct tnl_pipeline_stage _tnl_arb_vertex_program_stage =
 void
 _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program)
 {
-   if (program->Target == GL_VERTEX_PROGRAM_ARB) {
+   if (target == GL_VERTEX_PROGRAM_ARB) {
       /* free any existing tnl data hanging off the program */
       struct gl_vertex_program *vprog = (struct gl_vertex_program *) program;
       if (vprog->TnlData) {