Skip to content

Commit

Permalink
[IE CLDNN] Fix iterator invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
amolotko committed Jun 17, 2021
1 parent f6c23a7 commit 2becac5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inference-engine/thirdparty/clDNN/src/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,9 @@ void program_impl::swap_names(program_node& node1, program_node& node2) {
}

void program_impl::replace_all_usages(program_node& old_node, program_node& new_node) {
for (auto& user : old_node.users) {
auto itr = old_node.users.begin();
while (itr != old_node.users.end()) {
auto user = *(itr++);
user->replace_dependency(old_node, new_node);
}
}
Expand Down

0 comments on commit 2becac5

Please sign in to comment.