diff options
author | Laura Ekstrand <[email protected]> | 2014-12-12 11:02:02 -0800 |
---|---|---|
committer | Laura Ekstrand <[email protected]> | 2015-01-08 11:37:30 -0800 |
commit | 2546d901be3b47d8731ccfed5feb55afdab94763 (patch) | |
tree | 22ee9a863e13478a25a9931d2feae7bf1b2d11fd | |
parent | 50d679381d2cd2413f2c3d4098b81f9c04d5de18 (diff) |
main: glDeleteTextures now throws GL_INVALID_VALUE if n is negative.
This is in conformance with the OpenGL spec.
Reviewed-by: Anuj Phogat <[email protected]>
-rw-r--r-- | src/mesa/main/texobj.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 0ff271769e6..d6e44f24c8c 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1403,6 +1403,11 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures) FLUSH_VERTICES(ctx, 0); /* too complex */ + if (n < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteTextures(n)"); + return; + } + if (!textures) return; |