diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-07-19 12:34:56 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-07-19 12:36:32 -0700 |
commit | 303c99f12fd1234a763147f9e081f2544433fc77 (patch) | |
tree | a6108e001f70919e08f64b60a16de8a90ea6f856 | |
parent | 9303e358cb3062f62c39961ebd4708bf63db03c1 (diff) |
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.
-rw-r--r-- | src/glsl/linker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index d46744eeda..72b83ff992 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()) |