Skip to content

Commit

Permalink
Fixed invalid iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
PENGUINLIONG committed Jan 16, 2023
1 parent ff1fff1 commit cc41322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion taichi/ir/ir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void Block::replace_with(Stmt *old_statement,
*iter = std::move(new_statements[0]);
(*iter)->parent = this;
} else {
statements.erase(iter);
iter = statements.erase(iter);
insert_at(std::move(new_statements), iter);
}
}
Expand Down

0 comments on commit cc41322

Please sign in to comment.