From 88cdc5e23fadc81dcf8ab068c0620cf67712d01f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 18 May 2008 16:37:35 -0600 Subject: fix program delete/refcount bug --- src/mesa/state_tracker/st_cb_program.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index a293ec3f0b9..3154fc85aa4 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 ); } -- cgit v1.2.3