From c9ce3e8fd2a8db93c833bfd9a06d31843145657b Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Nov 2007 14:41:18 -0700 Subject: Check for NULL VB->EdgeFlag array. There might be a bug elsewhere, but this is a simple work-around for now. See bug 12614 --- src/mesa/swrast_setup/ss_tritmp.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/mesa/swrast_setup') diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index f6b738d60d..7d1bc23465 100644 --- a/src/mesa/swrast_setup/ss_tritmp.h +++ b/src/mesa/swrast_setup/ss_tritmp.h @@ -238,14 +238,16 @@ static void TAG(quadfunc)( GLcontext *ctx, GLuint v0, { if (IND & SS_UNFILLED_BIT) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLubyte ef1 = VB->EdgeFlag[v1]; - GLubyte ef3 = VB->EdgeFlag[v3]; - VB->EdgeFlag[v1] = 0; - TAG(triangle)( ctx, v0, v1, v3 ); - VB->EdgeFlag[v1] = ef1; - VB->EdgeFlag[v3] = 0; - TAG(triangle)( ctx, v1, v2, v3 ); - VB->EdgeFlag[v3] = ef3; + if (VB->EdgeFlag) { /* XXX this test shouldn't be needed (bug 12614) */ + GLubyte ef1 = VB->EdgeFlag[v1]; + GLubyte ef3 = VB->EdgeFlag[v3]; + VB->EdgeFlag[v1] = 0; + TAG(triangle)( ctx, v0, v1, v3 ); + VB->EdgeFlag[v1] = ef1; + VB->EdgeFlag[v3] = 0; + TAG(triangle)( ctx, v1, v2, v3 ); + VB->EdgeFlag[v3] = ef3; + } } else { TAG(triangle)( ctx, v0, v1, v3 ); TAG(triangle)( ctx, v1, v2, v3 ); -- cgit v1.2.3