summaryrefslogtreecommitdiff
path: root/src/CurveEditor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/CurveEditor.cxx')
-rw-r--r--src/CurveEditor.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CurveEditor.cxx b/src/CurveEditor.cxx
index b2db446..a9bb7a5 100644
--- a/src/CurveEditor.cxx
+++ b/src/CurveEditor.cxx
@@ -148,7 +148,8 @@ CurveEditor::init() {
void
CurveEditor::move_point(int i, double _x, double _y) {
- if (i >= n ||
+ if (n < 3 ||
+ i >= n ||
(_x < 0.0 || _x > 1.0 || _y < 0.0 || _y > 1.0) ||
(i < n - 1 && _x >= X[i + 1]) ||
(i > 0 && _x <= X[i - 1]))