diff options
Diffstat (limited to 'src/mesa/main/feedback.c')
-rw-r--r-- | 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 597ec1e3f9a..d73aa08fa3d 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 */ |