Mesa (master): mesa: ignore VAO IDs equal to 0 in glDeleteVertexArrays
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 31 02:34:15 UTC 2018
Module: Mesa
Branch: master
Commit: 355ed029b04fc510ae8d8605a2ef0c4ee726ac78
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=355ed029b04fc510ae8d8605a2ef0c4ee726ac78
Author: Marek Olšák <marek.olsak at amd.com>
Date: Thu Aug 30 15:14:46 2018 -0400
mesa: ignore VAO IDs equal to 0 in glDeleteVertexArrays
This fixes a firefox crash.
Fixes: 781a78914c798dc64005b37c6ca1224ce06803fc
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/main/arrayobj.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index a23031fe18..6e0665c0e5 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -1014,6 +1014,10 @@ delete_vertex_arrays(struct gl_context *ctx, GLsizei n, const GLuint *ids)
GLsizei i;
for (i = 0; i < n; i++) {
+ /* IDs equal to 0 should be silently ignored. */
+ if (!ids[i])
+ continue;
+
struct gl_vertex_array_object *obj = _mesa_lookup_vao(ctx, ids[i]);
if (obj) {
More information about the mesa-commit
mailing list