From 5cb203433ab5c4e54a7386a816263a237c716aa2 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 31 Oct 2007 09:38:51 -0600 Subject: check for count==0 in _mesa_validate_DrawArrays() --- src/mesa/main/api_validate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index e2eebccd47..74b0912bef 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -247,8 +247,9 @@ _mesa_validate_DrawArrays(GLcontext *ctx, { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (count < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); + if (count <= 0) { + if (count < 0) + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); return GL_FALSE; } -- cgit v1.2.3