summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-09-27 09:51:24 +0200
committerGitHub <noreply@github.com>2020-09-27 09:51:24 +0200
commit5e9194086dfce421a4b0657c347b53db22b64b87 (patch)
tree158d748c38e1df11cac2a82f3b23d28205a7bfbe
parentfc481db1c3187688d54b5afdb7a1ebb3e4d506c2 (diff)
parentbcc0493a4a1dcf0ba5ed5c34d0d0317d90dfd24c (diff)
Merge pull request #35924 from doot24/fix_#35863
Fixed Gradient.remove_point not allowing fewer than two points.
-rw-r--r--scene/resources/gradient.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp
index 4bcc52776b..b720653f91 100644
--- a/scene/resources/gradient.cpp
+++ b/scene/resources/gradient.cpp
@@ -129,7 +129,7 @@ void Gradient::add_point(float p_offset, const Color &p_color) {
void Gradient::remove_point(int p_index) {
ERR_FAIL_INDEX(p_index, points.size());
- ERR_FAIL_COND(points.size() <= 2);
+ ERR_FAIL_COND(points.size() <= 1);
points.remove(p_index);
emit_signal(CoreStringNames::get_singleton()->changed);
}