diff options
author | José Fonseca <[email protected]> | 2009-04-08 11:32:43 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-04-08 11:32:43 +0100 |
commit | 629700ed7eaaf63d2037a11b2931c91fdc22944a (patch) | |
tree | 108bc2d7137175e86511744edc2309b416931c37 /src/mesa/main | |
parent | 105758105a790dd8466c6be8c232c3f215ca4dee (diff) |
mesa: Don't attempt to free the dummy program.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/shared.c | 8 |
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); + } } |