From: Brian Date: Tue, 25 Dec 2007 00:37:30 +0000 (-0700) Subject: free Default1D/2DArray objects X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=552907d8a497d42f6693ca0f9324f003cfe3a66d;p=mesa.git free Default1D/2DArray objects --- 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);