Skip to content

Commit ace1cee

Browse files
committed
Fixed issue with TrackedObject AvgTimeBetweenPoints
1 parent 2e1805a commit ace1cee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

MLAPI/MonoBehaviours/Core/TrackedObject.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public float AvgTimeBetweenPointsMs
3737
{
3838
get
3939
{
40+
if (Framekeys.First == null || Framekeys.Last == null)
41+
return 0;
4042
float totalSpan = Framekeys.Last.Value - Framekeys.First.Value;
4143
return (totalSpan / Framekeys.Count) * 1000f;
4244
}

0 commit comments

Comments
 (0)