summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-05-10 09:56:02 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-05-10 09:56:02 +0000
commit9ca8815d3ba56ad718ba1c48c73aae3cdc0b8db0 (patch)
tree60c93ed831004e1bd87451f30ecc59fe3f73f091 /src/mesa
parentecb6bfc0ce33b1daa84093dceeb58a4b741283e9 (diff)
Fix texenv segfault. Reported by Ben Skeggs.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texenvprogram.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index ede3df2a0b..1f9d7ae1c5 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -705,6 +705,16 @@ void _mesa_UpdateTexEnvProgram( GLcontext *ctx )
p.program->NumTexIndirections = 1; /* correct? */
p.program->NumTexInstructions = 0;
p.program->NumAluInstructions = 0;
+ p.program->Base.String = 0;
+ p.program->Base.NumInstructions =
+ p.program->Base.NumTemporaries =
+ p.program->Base.NumParameters =
+ p.program->Base.NumAttributes = p.program->Base.NumAddressRegs = 0;
+ if (p.program->Parameters)
+ _mesa_free_parameter_list(p.program->Parameters);
+ p.program->Parameters = _mesa_new_parameter_list();
+ p.program->InputsRead = 0;
+ p.program->OutputsWritten = 0;
p.src_texture = undef;
p.src_previous = undef;