Bugfix: TrackDataHub should abort processing if stopped.

This commit is contained in:
Dennis Guse
2022-01-09 19:02:54 +01:00
parent 9dac5d3e72
commit 44e8cd1491
@@ -336,13 +336,13 @@ public class TrackDataHub {
try (TrackPointIterator trackPointIterator = contentProviderUtils.getTrackPointLocationIterator(selectedTrackId, next)) {
while (trackPointIterator.hasNext()) {
if (!isStarted()) {
break;
}
//Prevents a NPE if stop() is happening while notifyTrackPointsTableUpdate()
TrackStatisticsUpdater currentUpdater = trackStatisticsUpdater;
if (!isStarted()) {
return;
}
trackPoint = trackPointIterator.next();
TrackPoint.Id trackPointId = trackPoint.getId();