diff options
author | Kenneth Graunke <[email protected]> | 2010-07-23 12:49:17 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-07-26 19:09:10 -0700 |
commit | eb2cc4f1b1f5ac657c632aa41da5f23eb1cdbe10 (patch) | |
tree | eb916b744f3bcc3af13907d6648e815f4435c740 /src | |
parent | e2130d4e39b6ebd9f5d39598a006906680efd830 (diff) |
glsl2: Steal ir_variable's constant_value field.
Fixes a link-time crash in glsl-vs-cross-3.
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/ir.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 8ebef7d95a3..2fd654e9bfe 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -908,6 +908,9 @@ visit_exec_list(exec_list *list, ir_visitor *visitor) static void steal_memory(ir_instruction *ir, void *new_ctx) { + ir_variable *var = ir->as_variable(); + if (var != NULL && var->constant_value != NULL) + talloc_steal(ir, var->constant_value); talloc_steal(new_ctx, ir); } |