From 4f00b2bc7e4515257ff9c674259da1264ab2c9a3 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 20 Jun 2017 15:13:15 +0200 Subject: [PATCH] mesa: simplify _mesa_IsVertexArray() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit _mesa_lookup_vao() already returns NULL if id is zero. v2: - change the conditional (Ian) Signed-off-by: Samuel Pitoiset Reviewed-by: Alejandro Piñeiro (v1) --- 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..17a789f4da4 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 != NULL && obj->EverBound; } -- 2.30.2