diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index c5ae63052a7..e72bb495f7e 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2616,7 +2616,7 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level, format, type, texImage)) { /* error was recorded */ } - else if (width > 0 && height > 0 && height > 0) { + else if (width > 0 && height > 0 && depth > 0) { /* If we have a border, offset=-1 is legal. Bias by border width. */ switch (dims) { case 3: