According the man page, trigger a GL_INVALID_VALUE if size < 0. Signed-off-by: Yuanhan Liu <yuanhan....@linux.intel.com> --- src/mesa/main/feedback.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index 597ec1e..d73aa08 100644 --- a/src/mesa/main/feedback.c +++ b/src/mesa/main/feedback.c @@ -168,6 +168,11 @@ _mesa_SelectBuffer( GLsizei size, GLuint *buffer ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); + if (size < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glSelectBuffer(size)"); + return; + } + if (ctx->RenderMode==GL_SELECT) { _mesa_error( ctx, GL_INVALID_OPERATION, "glSelectBuffer" ); return; /* KW: added return */ -- 1.7.4.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev