From 8b7ba92605c0f21cf6292a1bc2e16e379c0b3be8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 14 May 2012 10:15:52 -0700 Subject: mesa: Fix assertion failure when a cube face is not present. Reviewed-by: Brian Paul Reviewed-by: Kenneth Graunke Reviewed-by: Ian Romanick --- src/mesa/main/texobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') 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) { -- cgit v1.2.3