From: Tilman Sauerbeck Date: Fri, 17 Sep 2010 23:56:34 +0000 (+0200) Subject: glsl2: Fixed cloning of ir_call error instructions. X-Git-Tag: android-x86-2.2~1068 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3894fddccc3a6da91513b49142a8f0dbbf8aa448;p=android-x86%2Fexternal-mesa.git 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 --- diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index aa84cf05725..18543a35aa1 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) {