summaryrefslogtreecommitdiff
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-09-05 22:11:38 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-09-05 22:11:38 +0000
commitc52fc9b49cbd6158da9e96ccd57a38197293a3e0 (patch)
tree858253840cff49abb1da3d20910137b3a8fd546f /src/mesa/main/teximage.c
parent9c27278acfb786c8f2fc591eef9ed0c25135bcf0 (diff)
passing proxy targets to glGetTexImage() should generate GL_INVALID_ENUM
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 24244674c5..6591658293 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.47 2000/09/05 22:04:30 brianp Exp $ */
+/* $Id: teximage.c,v 1.48 2000/09/05 22:11:38 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2123,7 +2123,10 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
texUnit = &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]);
texObj = _mesa_select_tex_object(ctx, texUnit, target);
texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- if (!texObj || !texImage) {
+ if (!texObj || !texImage ||
+ target == GL_PROXY_TEXTURE_1D ||
+ target == GL_PROXY_TEXTURE_2D ||
+ target == GL_PROXY_TEXTURE_3D) {
gl_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)");
return;
}