free stvp->draw_shader
authorBrian <brian.paul@tungstengraphics.com>
Tue, 15 Jan 2008 02:18:35 +0000 (19:18 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 15 Jan 2008 02:18:35 +0000 (19:18 -0700)
src/mesa/state_tracker/st_cb_program.c

index 63a954264e345b64f5068d6f04e73cda0d40002c..1f34fc86ad3b172adfd28fc657b15c7f20442513 100644 (file)
@@ -190,11 +190,15 @@ static void st_program_string_notify( GLcontext *ctx,
          stvp->cso = NULL;
       }
 
+      if (stvp->draw_shader) {
+         draw_delete_vertex_shader(st->draw, stvp->draw_shader);
+         stvp->draw_shader = NULL;
+      }
+
       stvp->param_state = stvp->Base.Base.Parameters->StateFlags;
 
       if (st->vp == stvp)
         st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
-
    }
 }