From 552907d8a497d42f6693ca0f9324f003cfe3a66d Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 24 Dec 2007 17:37:30 -0700 Subject: [PATCH] free Default1D/2DArray objects --- src/mesa/main/context.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 563a89e6869..a9f9bd9da44 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); -- 2.30.2