diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 9cc84fea36..8a81d37165 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -576,7 +576,9 @@ public class MeasurementToolFragment extends Fragment { } if (showOnMap) { SelectedGpxFile sf = activity.getMyApplication().getSelectedGpxHelper().selectGpxFile(gpx, true, false); - sf.processPoints(); + if (newGpxLine != null && sf != null) { + sf.processPoints(); + } } return res; }