mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
glsl2: Steal ir_variable's constant_value field.
Fixes a link-time crash in glsl-vs-cross-3.
This commit is contained in:
parent
e2130d4e39
commit
eb2cc4f1b1
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue