fix crash when deleting points too fast
This commit is contained in:
parent
094781ad9a
commit
cf8dec2c92
1 changed files with 2 additions and 0 deletions
|
@ -178,6 +178,8 @@ public class MeasurementEditingContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
public WptPt removePoint(int position, boolean updateSnapToRoad) {
|
public WptPt removePoint(int position, boolean updateSnapToRoad) {
|
||||||
|
if(position < 0 || position > before.points.size())
|
||||||
|
return new WptPt();
|
||||||
WptPt pt = before.points.remove(position);
|
WptPt pt = before.points.remove(position);
|
||||||
if (updateSnapToRoad) {
|
if (updateSnapToRoad) {
|
||||||
updateCacheForSnapIfNeeded(false);
|
updateCacheForSnapIfNeeded(false);
|
||||||
|
|
Loading…
Reference in a new issue