diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 2bdbf41..6c846cb 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -623,7 +623,9 @@ _mesa_ReadBuffer(GLenum buffer) if (buffer == GL_NONE) { /* This is legal--it means that no buffer should be bound for reading. */ - srcBuffer = -1; + _mesa_error(ctx, GL_INVALID_ENUM, + "glReadBuffer(buffer=0x%x)", buffer); + return; } else { /* general case / window-system framebuffer */