mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-29 15:27:14 +00:00
added some null-safety to polar service
This commit is contained in:
1 parent
9aba87a8a8
commit
044ae48875
1 file changed
+1
-1
+1
-1
@@ -77,7 +77,7 @@ public class GPSFixMovingWithPolarContext implements MovingAveragePolarClusterKe
|
||||
TrackedLegOfCompetitor currentLeg = race.getCurrentLeg(competitor, fix.getTimePoint());
|
||||
if (currentLeg != null) {
|
||||
Bearing realBearing = currentLeg.getBeatAngle(fix.getTimePoint());
|
||||
bearing = new DegreeBearingImpl(Math.abs(realBearing.getDegrees()));
|
||||
bearing = realBearing == null ? null : new DegreeBearingImpl(Math.abs(realBearing.getDegrees()));
|
||||
}
|
||||
} catch (NoWindException e) {
|
||||
bearing = null;
|
||||
|
||||
Reference in new issue
Block a user