From: Ian Romanick Date: Mon, 19 Jul 2010 19:34:56 +0000 (-0700) Subject: linker: Use foreach_list_safe in move_non_declarations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=303c99f12fd1234a763147f9e081f2544433fc77;p=mesa.git linker: Use foreach_list_safe in move_non_declarations The node being processed may be removed from the list and put in a different list. Not using the safe version caused list processing to change streams after moving a node. --- diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index d46744eeda5..72b83ff992d 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -543,7 +543,7 @@ exec_node * move_non_declarations(exec_list *instructions, exec_node *last, bool make_copies, gl_shader *target) { - foreach_list(node, instructions) { + foreach_list_safe(node, instructions) { ir_instruction *inst = (ir_instruction *) node; if (inst->as_variable() || inst->as_function())