From eb2cc4f1b1f5ac657c632aa41da5f23eb1cdbe10 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 23 Jul 2010 12:49:17 -0700 Subject: [PATCH] glsl2: Steal ir_variable's constant_value field. Fixes a link-time crash in glsl-vs-cross-3. --- src/glsl/ir.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.30.2