_mesa_lookup_vao() already returns NULL if id is zero. Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> --- src/mesa/main/arrayobj.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 82c00fbe826..7988a225baf 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -605,14 +605,9 @@ _mesa_IsVertexArray( GLuint id ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (id == 0) - return GL_FALSE; - obj = _mesa_lookup_vao(ctx, id); - if (obj == NULL) - return GL_FALSE; - return obj->EverBound; + return obj ? obj->EverBound : GL_FALSE; } -- 2.13.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev