[Mesa-dev] [PATCH 01/13] mesa/meta: Don't free meta if it was never initialized
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Tue May 5 04:25:17 PDT 2015
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
src/mesa/drivers/common/meta.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index d2ab7b8..b2cb0d5 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -407,6 +407,9 @@ void
_mesa_meta_free(struct gl_context *ctx)
{
GET_CURRENT_CONTEXT(old_context);
+ if (!ctx->Meta)
+ return;
+
_mesa_make_current(ctx, NULL, NULL);
_mesa_meta_glsl_blit_cleanup(&ctx->Meta->Blit);
meta_glsl_clear_cleanup(&ctx->Meta->Clear);
--
1.8.5.1
More information about the mesa-dev
mailing list