summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index cb1c81a44c1..92e23718aee 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3677,6 +3677,8 @@ texturesubimage(struct gl_context *ctx, GLuint dims,
/* Copy in each face. */
for (i = 0; i < 6; ++i) {
texImage = texObj->Image[i][level];
+ assert(texImage);
+
_mesa_texture_sub_image(ctx, 3, texObj, texImage, texObj->Target,
level, xoffset, yoffset, zoffset,
width, height, 1, format,
@@ -3686,8 +3688,7 @@ texturesubimage(struct gl_context *ctx, GLuint dims,
}
else {
texImage = _mesa_select_tex_image(texObj, texObj->Target, level);
- if (!texImage)
- return;
+ assert(texImage);
_mesa_texture_sub_image(ctx, dims, texObj, texImage, texObj->Target,
level, xoffset, yoffset, zoffset,