summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-21 14:42:26 +0100
committerGitHub <noreply@github.com>2021-02-21 14:42:26 +0100
commit5bf741509dfd0c7e5d9a7679cfabc998f736c7b5 (patch)
tree6ade0b2a3d0014441ccd39c10c2b13d89fdfbb1b /scene/2d
parent6fed9eb28788efbf9f4dd589b7742f24a6afbfd7 (diff)
parentdf49fdd189185c034ccb573a9aed0bd1c55c08d8 (diff)
Merge pull request #46284 from kleonc/line2d_set_point_position
Line2D::set_point_position Fail if passed index is out of bounds
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/line_2d.cpp1
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();
}