summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-08-30 15:14:46 -0400
committerMarek Olšák <[email protected]>2018-08-30 22:30:28 -0400
commit355ed029b04fc510ae8d8605a2ef0c4ee726ac78 (patch)
tree288178dadab215e9c6592ccd1558878a22afd0e8 /src/mesa/main/arrayobj.c
parentb147254d36c49c6bb9dc67ac8417374f091dc5c1 (diff)
mesa: ignore VAO IDs equal to 0 in glDeleteVertexArrays
This fixes a firefox crash. Fixes: 781a78914c798dc64005b37c6ca1224ce06803fc Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c4
1 files changed, 4 insertions, 0 deletions
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) {