diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2001-05-03 16:11:16 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2001-05-03 16:11:16 +0000 |
commit | a03463303dce5526f9439f704b28625329bde554 (patch) | |
tree | b72db34147398a5322db74715cbb21caf7225773 | |
parent | 9e351d52ae52927fbe505e8808e70de3e646be79 (diff) |
added assertion to catch infinite loop in _tnl_fixup_compiled_cassette() - might help Keith
-rw-r--r-- | src/mesa/tnl/t_imm_fixup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_imm_fixup.c b/src/mesa/tnl/t_imm_fixup.c index 1c3cf2861c..8bf0982a84 100644 --- a/src/mesa/tnl/t_imm_fixup.c +++ b/src/mesa/tnl/t_imm_fixup.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_fixup.c,v 1.13 2001/04/30 21:08:52 keithw Exp $ */ +/* $Id: t_imm_fixup.c,v 1.14 2001/05/03 16:11:16 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -631,7 +631,9 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM ) if (tnl->ExecParity) IM->Primitive[IM->CopyStart] |= PRIM_PARITY; - + /* one of these should be true, else we'll be in an infinite loop */ + assert(IM->PrimitiveLength[IM->Start] > 0 || + IM->Flag[IM->Start] & (VERT_END|VERT_END_VB)); for (i = IM->Start ; i <= IM->Count ; i += IM->PrimitiveLength[i]) if (IM->Flag[i] & (VERT_END|VERT_END_VB)) { IM->PrimitiveLength[IM->CopyStart] = i - IM->CopyStart; |