Fix crash when smoothing freehand curves

This commit is contained in:
Thomas Goyne 2013-09-18 15:59:01 -07:00
parent 6a6c983f19
commit 8d5a54ff5e
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ void Spline::Smooth(float smooth) {
// Smooth curve
for (iterator cur = begin(); cur != end(); ++cur) {
iterator prev_curve = prev(cur == begin() ? cur : end());
iterator prev_curve = prev(cur != begin() ? cur : end());
iterator next_curve = next(cur);
if (next_curve == end())
next_curve = begin();