diff options
author | Henry Song <henry.song@samsung.com> | 2013-11-12 09:53:29 -0800 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2013-11-13 17:09:29 -0800 |
commit | 8c73949e44d4201fafc899693964c934f7072fa6 (patch) | |
tree | a0d50b9ea17ea537df237be617776a7763dd668a | |
parent | 56a195a76554abe1d5567c733ba679058fe01303 (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.c | 2 |
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]); } |