From: Samuel Pitoiset Date: Tue, 20 Jun 2017 13:13:15 +0000 (+0200) Subject: mesa: simplify _mesa_IsVertexArray() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f00b2bc7e4515257ff9c674259da1264ab2c9a3;p=mesa.git mesa: simplify _mesa_IsVertexArray() _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) --- 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; }