diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-09-07 19:11:39 +0200 |
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-09-07 19:11:39 +0200 |
| commit | a804e1f5645ac75d196e0c9f1ac3b2524a42aac3 (patch) | |
| tree | e50f5605c4d33b5f782665ed6a1b96a1371f6061 /src/CurveEditor.cxx | |
| parent | dbb5d91242ea2f5348db6608aafa5719c6713973 (diff) | |
check for enough control points in move_point
Diffstat (limited to 'src/CurveEditor.cxx')
| -rw-r--r-- | src/CurveEditor.cxx | 3 |
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])) |
