summaryrefslogtreecommitdiff
path: root/src/glsl
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2010-09-18 01:56:34 +0200
committerKenneth Graunke <kenneth@whitecape.org>2010-09-18 09:19:57 +0200
commit3894fddccc3a6da91513b49142a8f0dbbf8aa448 (patch)
treeb8b1e6857242a7f82e8b86bd1aaadf163678a252 /src/glsl
parenta822ae3f1a14ddd00a6368d767213ea42d00e7fb (diff)
glsl2: Fixed cloning of ir_call error instructions.
Those have the callee field set to the null pointer, so calling the public constructor will segfault. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ir_clone.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index aa84cf0572..18543a35aa 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -141,6 +141,9 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const
ir_call *
ir_call::clone(void *mem_ctx, struct hash_table *ht) const
{
+ if (this->type == glsl_type::error_type)
+ return ir_call::get_error_instruction(mem_ctx);
+
exec_list new_parameters;
foreach_iter(exec_list_iterator, iter, this->actual_parameters) {