From a804e1f5645ac75d196e0c9f1ac3b2524a42aac3 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 7 Sep 2008 19:11:39 +0200 Subject: check for enough control points in move_point --- src/CurveEditor.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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])) -- cgit v1.2.3