You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed a few issues with Color keyframes
This commit is contained in:
@@ -202,10 +202,10 @@ Point Keyframe::GetClosestPoint(Point p) {
|
||||
|
||||
// Handle edge cases (if no point was found)
|
||||
if (closest.co.X == -1) {
|
||||
if (p.co.X < 1)
|
||||
if (p.co.X < 1 && Points.size() > 0)
|
||||
// Assign 1st point
|
||||
closest = Points[0];
|
||||
else
|
||||
else if (Points.size() > 0)
|
||||
// Assign last point
|
||||
closest = Points[Points.size() - 1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user