summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_clone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir_clone.cpp')
-rw-r--r--src/glsl/ir_clone.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index 40ed33afcee..8f57499ec97 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -163,7 +163,8 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const
new_loop->to = this->to->clone(mem_ctx, ht);
if (this->increment)
new_loop->increment = this->increment->clone(mem_ctx, ht);
- new_loop->counter = counter;
+ if (this->counter)
+ new_loop->counter = this->counter->clone(mem_ctx, ht);
foreach_iter(exec_list_iterator, iter, this->body_instructions) {
ir_instruction *ir = (ir_instruction *)iter.get();