diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-06-25 14:46:48 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-06-25 14:46:48 +0000 |
commit | c9a415663ad92a703b5b1e1e70cd41727114b760 (patch) | |
tree | b3b3d2a0dc247771798252ecaa2f7247437e6f3f /src/mesa | |
parent | a09db0a7fa38c8161374ae4df3aa375efd5acbb0 (diff) |
remove program from hash table when deleted (bug 979514)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/program.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index b58b5e003d..8dc6ecb742 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -974,14 +974,13 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids) ctx->Driver.DeleteProgram(ctx, prog); } } - else { - /* This is necessary as we can't tell from HashLookup - * whether the entry exists with data == 0, or if it - * doesn't exist at all. As GenPrograms creates the first - * case below, need to call Remove() to avoid memory leak: - */ - _mesa_HashRemove(ctx->Shared->Programs, ids[i]); - } + /* Always remove entry from hash table. + * This is necessary as we can't tell from HashLookup + * whether the entry exists with data == 0, or if it + * doesn't exist at all. As GenPrograms creates the first + * case below, need to call Remove() to avoid memory leak: + */ + _mesa_HashRemove(ctx->Shared->Programs, ids[i]); } } } |