summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/arbvertparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/arbvertparse.c')
-rw-r--r--src/mesa/shader/arbvertparse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/shader/arbvertparse.c b/src/mesa/shader/arbvertparse.c
index 0208389c355..5d1ad3de2e7 100644
--- a/src/mesa/shader/arbvertparse.c
+++ b/src/mesa/shader/arbvertparse.c
@@ -191,6 +191,11 @@ _mesa_parse_arb_vertex_program(GLcontext * ctx, GLenum target,
program->IsPositionInvariant = ap.HintPositionInvariant;
program->InputsRead = ap.InputsRead;
program->OutputsWritten = ap.OutputsWritten;
+
+ if (program->Parameters) {
+ /* free previous program's parameters */
+ _mesa_free_parameter_list(program->Parameters);
+ }
program->Parameters = ap.Parameters;
program->Instructions = ap.VPInstructions;