mesa: simplify _mesa_IsVertexArray()

_mesa_lookup_vao() already returns NULL if id is zero.

v2: - change the conditional (Ian)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> (v1)
This commit is contained in:
Samuel Pitoiset
2017-06-20 15:13:15 +02:00
parent cb3e01ca71
commit 4f00b2bc7e

View File

@@ -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;
}