fixed glTexSubImage error check bug #128775
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 23 Jan 2001 23:35:23 +0000 (23:35 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 23 Jan 2001 23:35:23 +0000 (23:35 +0000)
src/mesa/main/teximage.c

index 253acf65daef097d17eb42945dc471c4b1ecd4b0..9e2609dd583ee6521dd165195a4e2adeb069581f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.69 2000/12/26 05:09:29 keithw Exp $ */
+/* $Id: teximage.c,v 1.70 2001/01/23 23:35:23 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -1252,7 +1252,8 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
       return GL_TRUE;
    }
 
-   destTex = texUnit->Current2D->Image[level];
+   destTex = _mesa_select_tex_image(ctx, texUnit, target, level);
+
    if (!destTex) {
       gl_error(ctx, GL_INVALID_OPERATION, "glTexSubImage2D");
       return GL_TRUE;