diff options
author | Brian Paul <[email protected]> | 2008-05-14 12:10:45 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-14 12:11:17 -0600 |
commit | 57e222d6e5ef5744491d093475e1136aedf81810 (patch) | |
tree | 1c6af771d12b6be91a20649ecb46b4bea8b4d319 /src/mesa/shader/shader_api.c | |
parent | 4b7d301c94d33394550322768a9d2232087b2d64 (diff) |
fix some additional program refcounting bugs
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r-- | src/mesa/shader/shader_api.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index c319cef10a5..65a8c6cc54a 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -246,10 +246,8 @@ _mesa_free_shader(GLcontext *ctx, struct gl_shader *sh) _mesa_free((void *) sh->Source); if (sh->InfoLog) _mesa_free(sh->InfoLog); - for (i = 0; i < sh->NumPrograms; i++) { - assert(sh->Programs[i]); - ctx->Driver.DeleteProgram(ctx, sh->Programs[i]); - } + for (i = 0; i < sh->NumPrograms; i++) + _mesa_reference_program(ctx, &sh->Programs[i], NULL); if (sh->Programs) _mesa_free(sh->Programs); _mesa_free(sh); |