From: Eric Anholt Date: Mon, 14 May 2012 17:15:52 +0000 (-0700) Subject: mesa: Fix assertion failure when a cube face is not present. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b7ba92605c0f21cf6292a1bc2e16e379c0b3be8;p=mesa.git mesa: Fix assertion failure when a cube face is not present. Reviewed-by: Brian Paul Reviewed-by: Kenneth Graunke Reviewed-by: Ian Romanick --- diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 365169dddc6..a471bad22b6 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -558,7 +558,8 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, GLuint face; assert(baseImage->Width2 == baseImage->Height); for (face = 1; face < 6; face++) { - assert(t->Image[face][baseLevel]->Width2 == + assert(t->Image[face][baseLevel] == NULL || + t->Image[face][baseLevel]->Width2 == t->Image[face][baseLevel]->Height2); if (t->Image[face][baseLevel] == NULL || t->Image[face][baseLevel]->Width2 != baseImage->Width2) {