bug 2088: avoiding NPE when drawing advantage line with fixes lacking speed/bearing

This commit is contained in:
Axel Uhl committed 2014-07-23 21:35:05 +02:00
1 parent 66a3d1f687
commit 080be4d5be
1 file changed
+1 -1
@@ -883,7 +883,7 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
}
lastBoatFix = getBoatFix(visibleLeaderInfo.getB(), date);
}
if (isVisibleLeaderInfoComplete && isLegTypeKnown && lastBoatFix != null) {
if (isVisibleLeaderInfoComplete && isLegTypeKnown && lastBoatFix != null && lastBoatFix.speedWithBearing != null) {
LegInfoDTO legInfoDTO = lastRaceTimesInfo.getLegInfos().get(visibleLeaderInfo.getA() - 1);
double advantageLineLengthInKm = 1.0; // TODO this should probably rather scale with the visible
// area of the map; bug 616