summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texobj.c5
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;