From: Marek Olšák Date: Thu, 30 Aug 2018 19:14:46 +0000 (-0400) Subject: mesa: ignore VAO IDs equal to 0 in glDeleteVertexArrays X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=355ed029b04fc510ae8d8605a2ef0c4ee726ac78;p=mesa.git mesa: ignore VAO IDs equal to 0 in glDeleteVertexArrays This fixes a firefox crash. Fixes: 781a78914c798dc64005b37c6ca1224ce06803fc Reviewed-by: Ian Romanick --- 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) {