mirror of https://github.com/odrling/Aegisub
Fix crash when smoothing freehand curves
This commit is contained in:
parent
6a6c983f19
commit
8d5a54ff5e
|
@ -275,7 +275,7 @@ void Spline::Smooth(float smooth) {
|
||||||
|
|
||||||
// Smooth curve
|
// Smooth curve
|
||||||
for (iterator cur = begin(); cur != end(); ++cur) {
|
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);
|
iterator next_curve = next(cur);
|
||||||
if (next_curve == end())
|
if (next_curve == end())
|
||||||
next_curve = begin();
|
next_curve = begin();
|
||||||
|
|
Loading…
Reference in New Issue