[Mesa-dev] [PATCH 39/41] main: glDeleteTextures now throws GL_INVALID_VALUE if n is negative.
Laura Ekstrand
laura at jlekstrand.net
Mon Dec 15 17:22:54 PST 2014
This is in conformance with the OpenGL spec.
---
src/mesa/main/texobj.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 9cf3461..ecb14cf 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1378,6 +1378,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;
--
2.1.0
More information about the mesa-dev
mailing list