From 355ed029b04fc510ae8d8605a2ef0c4ee726ac78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 30 Aug 2018 15:14:46 -0400 Subject: [PATCH] mesa: ignore VAO IDs equal to 0 in glDeleteVertexArrays This fixes a firefox crash. Fixes: 781a78914c798dc64005b37c6ca1224ce06803fc Reviewed-by: Ian Romanick --- 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 a23031fe182..6e0665c0e5d 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) { -- 2.30.2