_mesa_lookup_renderbuffer() already checks if 'id' is non-zero.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
GLboolean GLAPIENTRY
_mesa_IsRenderbuffer(GLuint renderbuffer)
{
+ struct gl_renderbuffer *rb;
+
GET_CURRENT_CONTEXT(ctx);
+
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
- if (renderbuffer) {
- struct gl_renderbuffer *rb =
- _mesa_lookup_renderbuffer(ctx, renderbuffer);
- if (rb != NULL && rb != &DummyRenderbuffer)
- return GL_TRUE;
- }
- return GL_FALSE;
+
+ rb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
+ return rb != NULL && rb != &DummyRenderbuffer;
}