aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_draw.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-04-17 10:19:47 -0600
committerBrian <[email protected]>2007-04-17 10:19:47 -0600
commitd2d86a3f0b38716196ea2b3ffa4cbbd0420de1b3 (patch)
treecb05396b2fb5407f478690e9cebcbcca7eb72ac9 /src/mesa/tnl/t_draw.c
parent9cbcf7c696372c680c87cf60c2e290e78e9e14c8 (diff)
In bind_inputs() set VB->EdgeFlag to NULL if it's not needed.
Otherwise, the clip/interp code was finding VB->EdgeFlag to be non-null and reading/writing it when the memory may have been freed earlier in free_space(). This fixes several VTK segfaults/failures reported by Brad King @ Kitware.
Diffstat (limited to 'src/mesa/tnl/t_draw.c')
-rw-r--r--src/mesa/tnl/t_draw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index c97cf5f7b21..5b2b2ae5495 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -251,7 +251,10 @@ static void bind_inputs( GLcontext *ctx,
VB->AttribPtr[_TNL_ATTRIB_EDGEFLAG],
VB->Count );
}
-
+ else {
+ /* the data previously pointed to by EdgeFlag may have been freed */
+ VB->EdgeFlag = NULL;
+ }
}