added some null-safety to polar service

This commit is contained in:
Axel Uhl committed 2015-05-30 06:33:28 +02:00
1 parent 9aba87a8a8
commit 044ae48875
1 file changed
+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;