summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-18 16:37:35 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-18 16:37:35 -0600
commit88cdc5e23fadc81dcf8ab068c0620cf67712d01f (patch)
tree29d95c81c01fbd4c98b327eb2faa963725356ca3
parent54fbd8bbd4e5a484d59907bae852908e3a8b8f3c (diff)
fix program delete/refcount bug
-rw-r--r--src/mesa/state_tracker/st_cb_program.c5
1 files changed, 4 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..3154fc85aa 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);
@@ -169,6 +171,7 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
assert(0); /* problem */
}
+ /* delete base class */
_mesa_delete_program( ctx, prog );
}