mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 03:13:49 +00:00
fix null-pointer-exception when determining current-leg;
This commit is contained in:
1 parent
d599f90158
commit
edca95fa93
1 file changed
+7
-2
+7
-2
@@ -738,7 +738,7 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
|
||||
public void onSuccess(RaceMapDataDTO raceMapDataDTO) {
|
||||
if (map != null && raceMapDataDTO != null) {
|
||||
quickRanks = raceMapDataDTO.quickRanks;
|
||||
if (showViewSimulation) {
|
||||
if (showViewSimulation && settings.isShowSimulationOverlay()) {
|
||||
simulationOverlay.updateLeg(getCurrentLeg(), newTime, false);
|
||||
}
|
||||
// process response only if not received out of order
|
||||
@@ -2219,7 +2219,12 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
|
||||
}
|
||||
|
||||
public int getCurrentLeg() {
|
||||
return this.getLeadingVisibleCompetitorWithOneBasedLegNumber(getCompetitorsToShow()).getA();
|
||||
com.sap.sse.common.Util.Pair<Integer, CompetitorDTO> leaderWithLeg = this.getLeadingVisibleCompetitorWithOneBasedLegNumber(getCompetitorsToShow());
|
||||
if (leaderWithLeg == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return leaderWithLeg.getA();
|
||||
}
|
||||
}
|
||||
|
||||
private Image createSAPLogo() {
|
||||
|
||||
Reference in new issue
Block a user