[Mesa-dev] [PATCH 8/9] mesa: Fix assertion failure when a cube face is not present.

Eric Anholt eric at anholt.net
Mon May 14 17:36:59 PDT 2012


---
 src/mesa/main/texobj.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 365169d..a471bad 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) {
-- 
1.7.10



More information about the mesa-dev mailing list