Fix possible crash

This commit is contained in:
crimean 2019-02-17 15:54:51 +03:00
parent 75b28b224d
commit e57db2bfc2

View file

@ -1103,8 +1103,9 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
}
public void selectMapMarker(final int index, final PointType pointType) {
if (index != -1) {
MapMarker m = mapActivity.getMyApplication().getMapMarkersHelper().getMapMarkers().get(index);
List<MapMarker> mapMarkers = mapActivity.getMyApplication().getMapMarkersHelper().getMapMarkers();
if (index != -1 && mapMarkers.size() > index) {
MapMarker m = mapMarkers.get(index);
LatLon point = new LatLon(m.getLatitude(), m.getLongitude());
TargetPointsHelper targets = getTargets();
switch (pointType) {