summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 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);