mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-30 17:36:40 +00:00
avoid NPE in CourseBasedWindTrack
This commit is contained in:
1 parent
71c7f833fd
commit
fe0fb3eeb1
1 file changed
+4
-1
+4
-1
@@ -34,7 +34,10 @@ public class CourseBasedWindTrackImpl extends WindTrackImpl {
|
|||||||
TimePoint startTime = trackedRace.getStart();
|
TimePoint startTime = trackedRace.getStart();
|
||||||
if (startTime != null) {
|
if (startTime != null) {
|
||||||
result = new ArrayListNavigableSet<Wind>(1, WindComparator.INSTANCE);
|
result = new ArrayListNavigableSet<Wind>(1, WindComparator.INSTANCE);
|
||||||
result.add(trackedRace.getDirectionFromStartToNextMark(startTime));
|
final Wind directionFromStartToNextMark = trackedRace.getDirectionFromStartToNextMark(startTime);
|
||||||
|
if (directionFromStartToNextMark != null) {
|
||||||
|
result.add(directionFromStartToNextMark);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
result = empty;
|
result = empty;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user