bug6041: aligned solution with what we had already for getAverageAbsoluteCrossTrackError

This commit is contained in:
Axel Uhl committed 2024-07-31 18:58:20 +02:00
1 parent 2cc3bbbc6e
commit 05ec1bd2b8
1 file changed
+5 -1
@@ -565,7 +565,11 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor {
if (legStartMarkPassing != null) {
TimePoint legStart = legStartMarkPassing.getTimePoint();
final TimePoint to = getTimePointNotAfterFinishingOfLeg(timePoint);
result = getTrackedRace().getAverageSignedCrossTrackError(competitor, legStart, to, /* upwindOnly */ false, waitForLatestAnalysis);
if (to != null) {
result = getTrackedRace().getAverageSignedCrossTrackError(competitor, legStart, to, /* upwindOnly */ false, waitForLatestAnalysis);
} else {
result = null;
}
} else {
result = null;
}