summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cairo-gl-shaders.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c
index b5796f7..cfc8540 100644
--- a/src/cairo-gl-shaders.c
+++ b/src/cairo-gl-shaders.c
@@ -302,6 +302,13 @@ _cairo_gl_context_fini_shaders (cairo_gl_context_t *ctx)
ctx->dispatch.DeleteShader (ctx->vertex_shaders[i]);
}
+ if (ctx->fill_rectangles_shader.program ||
+ ctx->fill_rectangles_shader.fragment_shader) {
+ _cairo_gl_shader_fini(ctx, &ctx->fill_rectangles_shader);
+ ctx->fill_rectangles_shader.fragment_shader = 0;
+ ctx->fill_rectangles_shader.program = 0;
+ }
+
_cairo_cache_fini (&ctx->shaders);
}