summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorkleonc <9283098+kleonc@users.noreply.github.com>2021-02-21 13:50:11 +0100
committerkleonc <9283098+kleonc@users.noreply.github.com>2021-02-21 13:50:11 +0100
commitdf49fdd189185c034ccb573a9aed0bd1c55c08d8 (patch)
tree0a55c584a7e6864c814193fbdfbf3c559aa6524b /scene/2d
parentff8a1fdc19842aaa52a23e303425f5a703e8317b (diff)
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();
}