diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-21 14:42:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 14:42:26 +0100 |
commit | 5bf741509dfd0c7e5d9a7679cfabc998f736c7b5 (patch) | |
tree | 6ade0b2a3d0014441ccd39c10c2b13d89fdfbb1b | |
parent | 6fed9eb28788efbf9f4dd589b7742f24a6afbfd7 (diff) | |
parent | df49fdd189185c034ccb573a9aed0bd1c55c08d8 (diff) |
Merge pull request #46284 from kleonc/line2d_set_point_position
Line2D::set_point_position Fail if passed index is out of bounds
-rw-r--r-- | scene/2d/line_2d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 2959ea1a36..37eb45c21d 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -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(); } |