forked from upstream-mirrors/OpenTracks
Bugfix: TrackDataHub should abort processing if stopped.
This commit is contained in:
@@ -336,13 +336,13 @@ public class TrackDataHub {
|
|||||||
try (TrackPointIterator trackPointIterator = contentProviderUtils.getTrackPointLocationIterator(selectedTrackId, next)) {
|
try (TrackPointIterator trackPointIterator = contentProviderUtils.getTrackPointLocationIterator(selectedTrackId, next)) {
|
||||||
|
|
||||||
while (trackPointIterator.hasNext()) {
|
while (trackPointIterator.hasNext()) {
|
||||||
if (!isStarted()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Prevents a NPE if stop() is happening while notifyTrackPointsTableUpdate()
|
//Prevents a NPE if stop() is happening while notifyTrackPointsTableUpdate()
|
||||||
TrackStatisticsUpdater currentUpdater = trackStatisticsUpdater;
|
TrackStatisticsUpdater currentUpdater = trackStatisticsUpdater;
|
||||||
|
|
||||||
|
if (!isStarted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
trackPoint = trackPointIterator.next();
|
trackPoint = trackPointIterator.next();
|
||||||
TrackPoint.Id trackPointId = trackPoint.getId();
|
TrackPoint.Id trackPointId = trackPoint.getId();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user