From 03a1570a745529e72348a5ebd88c6d773913a0a9 Mon Sep 17 00:00:00 2001 From: qarmin Date: Thu, 6 Jun 2019 21:09:37 +0200 Subject: [PATCH] Fix 2D Line crash (cherry picked from commit 2621131549164d0a6107d7c957a792c1707d6ce4) --- scene/2d/line_2d.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 73692e05356..b4d6ccb9e8d 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -105,6 +105,7 @@ void Line2D::set_point_position(int i, Vector2 pos) { } Vector2 Line2D::get_point_position(int i) const { + ERR_FAIL_INDEX_V(i, _points.size(), Vector2()) return _points.get(i); }