Merge pull request #46284 from kleonc/line2d_set_point_position

Line2D::set_point_position Fail if passed index is out of bounds
This commit is contained in:
Rémi Verschelde 2021-02-21 14:42:26 +01:00 committed by GitHub
commit 5bf741509d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,6 +116,7 @@ Vector<Vector2> Line2D::get_points() const {
}
void Line2D::set_point_position(int i, Vector2 p_pos) {
ERR_FAIL_INDEX(i, _points.size());
_points.set(i, p_pos);
update();
}