summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-19 09:04:02 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-19 09:04:02 -0600
commit38fb20b2240e826394dbf56dc54f226c5f887631 (patch)
tree16f815ffdd3d64e70a9baf0111e4b6672e35637f /src/mesa/state_tracker
parent62f96ddbbc2549bd4d50016f571cd4d1f6f6a7d6 (diff)
fix program delete/refcount bug
cherry-picked from gallium-tex-surfaces
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_program.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index a293ec3f0b..b23e000a0b 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -159,7 +159,9 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
}
if (stfp->bitmap_program) {
- st_delete_program(ctx, &stfp->bitmap_program->Base.Base);
+ struct gl_program *prg = &stfp->bitmap_program->Base.Base;
+ _mesa_reference_program(ctx, &prg, NULL);
+ stfp->bitmap_program = NULL;
}
st_free_translated_vertex_programs(st, stfp->vertex_programs);