summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-31 09:39:20 -0600
committerBrian <[email protected]>2007-10-31 09:39:20 -0600
commit1a7640958c5996d19a9b3a313a53a15880404b9f (patch)
tree433f8773cadcf87f5a1eaefb99c993ab5cf0b20d /src/mesa
parent2e2a5a450b129262b50001676500c02b3feb326e (diff)
check for count==0 in _mesa_validate_DrawArrays()
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/api_validate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 454484382f1..7d75cd796bc 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;
}