From: Brian Date: Mon, 5 Nov 2007 21:41:18 +0000 (-0700) Subject: Check for NULL VB->EdgeFlag array. X-Git-Tag: 062012170305~19322^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9ce3e8fd2a8db93c833bfd9a06d31843145657b;p=profile%2Fivi%2Fmesa.git Check for NULL VB->EdgeFlag array. There might be a bug elsewhere, but this is a simple work-around for now. See bug 12614 --- diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index f6b738d..7d1bc23 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 );