summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-12-24 17:37:30 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-01 10:21:20 -0700
commit552907d8a497d42f6693ca0f9324f003cfe3a66d (patch)
tree67a6dd85a0cf069090d2d49b7041f588804f17fa /src/mesa/main
parentf9e0e2b3efbc45a290f0a84a1beb63cd8c4f8428 (diff)
free Default1D/2DArray objects
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 563a89e686..a9f9bd9da4 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -554,8 +554,13 @@ alloc_shared_state( GLcontext *ctx )
(*ctx->Driver.DeleteTexture)(ctx, ss->DefaultCubeMap);
if (ss->DefaultRect)
(*ctx->Driver.DeleteTexture)(ctx, ss->DefaultRect);
- if (ss)
- _mesa_free(ss);
+ if (ss->Default1DArray)
+ (*ctx->Driver.DeleteTexture)(ctx, ss->Default1DArray);
+ if (ss->Default2DArray)
+ (*ctx->Driver.DeleteTexture)(ctx, ss->Default2DArray);
+
+ _mesa_free(ss);
+
return GL_FALSE;
}
@@ -678,6 +683,9 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
ctx->Driver.DeleteTexture(ctx, ss->Default3D);
ctx->Driver.DeleteTexture(ctx, ss->DefaultCubeMap);
ctx->Driver.DeleteTexture(ctx, ss->DefaultRect);
+ ctx->Driver.DeleteTexture(ctx, ss->Default1DArray);
+ ctx->Driver.DeleteTexture(ctx, ss->Default2DArray);
+
/* all other textures */
_mesa_HashDeleteAll(ss->TexObjects, delete_texture_cb, ctx);
_mesa_DeleteHashTable(ss->TexObjects);