summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shared.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2009-04-10 17:16:08 -0400
committerAlex Deucher <[email protected]>2009-04-10 17:16:08 -0400
commit04f335fd16c2a13b9425797acf5c3989cb6def7f (patch)
tree9e92cecb0b2ac512fac1fc4ef911878849eaeb42 /src/mesa/main/shared.c
parentc0419f190c836130932164ac47cfb53de668d423 (diff)
parent5e361c47abf2ee20140628d327eda9b39351d415 (diff)
Merge branch 'radeon-rewrite' of git+ssh://[email protected]/git/mesa/mesa into r6xx-rewrite
Diffstat (limited to 'src/mesa/main/shared.c')
-rw-r--r--src/mesa/main/shared.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index fa45e466b7f..193ac8970cf 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -159,9 +159,11 @@ delete_program_cb(GLuint id, void *data, void *userData)
{
struct gl_program *prog = (struct gl_program *) data;
GLcontext *ctx = (GLcontext *) userData;
- ASSERT(prog->RefCount == 1); /* should only be referenced by hash table */
- prog->RefCount = 0; /* now going away */
- ctx->Driver.DeleteProgram(ctx, prog);
+ if(prog != &_mesa_DummyProgram) {
+ ASSERT(prog->RefCount == 1); /* should only be referenced by hash table */
+ prog->RefCount = 0; /* now going away */
+ ctx->Driver.DeleteProgram(ctx, prog);
+ }
}