From: Kenneth Graunke Date: Fri, 23 Jul 2010 19:49:17 +0000 (-0700) Subject: glsl2: Steal ir_variable's constant_value field. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb2cc4f1b1f5ac657c632aa41da5f23eb1cdbe10;p=mesa.git glsl2: Steal ir_variable's constant_value field. Fixes a link-time crash in glsl-vs-cross-3. --- 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); }