summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Song <henry.song@samsung.com>2013-11-12 09:53:29 -0800
committerMartin Robinson <mrobinson@igalia.com>2013-11-13 17:09:29 -0800
commit8c73949e44d4201fafc899693964c934f7072fa6 (patch)
treea0d50b9ea17ea537df237be617776a7763dd668a
parent56a195a76554abe1d5567c733ba679058fe01303 (diff)
gl: Fix one off issue in context cleanup
ctx->vertex_shaders is only CAIRO_GL_VAR_TYPE_MAX large, so we should abort the loop before the index is equal to CAIRO_GL_VAR_TYPE_MAX. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
-rw-r--r--src/cairo-gl-shaders.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c
index cc22cea..2710606 100644
--- a/src/cairo-gl-shaders.c
+++ b/src/cairo-gl-shaders.c
@@ -198,7 +198,7 @@ _cairo_gl_context_fini_shaders (cairo_gl_context_t *ctx)
{
int i;
- for (i = 0; i <= CAIRO_GL_VAR_TYPE_MAX; i++) {
+ for (i = 0; i < CAIRO_GL_VAR_TYPE_MAX; i++) {
if (ctx->vertex_shaders[i])
ctx->dispatch.DeleteShader (ctx->vertex_shaders[i]);
}