Merge pull request #9791 from osmandapp/Fix_9772

Fix_9772
This commit is contained in:
vshcherb 2020-09-11 17:15:54 +02:00 committed by GitHub
commit d33b29a5cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -743,7 +743,7 @@ public class MeasurementEditingContext {
locations.add(l);
}
pair.second.setTrkPtIndex(locations.size() - 1);
if (i < size - 2) {
if (i < size - 2 && !locations.isEmpty()) {
locations.remove(locations.size() - 1);
}
route.addAll(data.segments);