mesa: Don't attempt to free the dummy program.

This commit is contained in:
José Fonseca
2009-04-08 11:32:43 +01:00
parent 105758105a
commit 629700ed7e

View File

@@ -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);
}
}