summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index d3e941d7f8a..d0f19d01573 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2203,6 +2203,11 @@ _mesa_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
GLint i;
GET_CURRENT_CONTEXT(ctx);
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteFramebuffers(n < 0)");
+ return;
+ }
+
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
for (i = 0; i < n; i++) {