avoid NPE if trying to stop tracking for a TracTrac race that hasn't been found

Change-Id: Ifa266cc5decd6f1bfa6287c6a87ed0df48baa515
This commit is contained in:
Axel Uhl committed 2017-08-03 14:15:53 +02:00
1 parent afb10da200
commit 0fcc38c73a
1 file changed
+3 -1
@@ -662,7 +662,9 @@ public class TracTracRaceTrackerImpl extends AbstractRaceTrackerImpl
@Override
public void raceNotLoaded(String reason) throws MalformedURLException, IOException, InterruptedException {
logger.severe("Race for tracker "+this+" with ID "+getID()+" did not load: "+reason+". Stopping tracker.");
trackedRegattaRegistry.stopTracking(regatta, race);
if (race != null) {
trackedRegattaRegistry.stopTracking(regatta, race);
}
}
@Override