IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException: Index: 3, Size: 2
	at java.util.ArrayList.get(ArrayList.java:437)
	at net.osmand.plus.routepreparationmenu.cards.TrackEditCard.updateContent(TrackEditCard.java:92)
This commit is contained in:
androiddevkotlin 2021-03-15 00:25:33 +02:00
parent 64336f85de
commit 44e7bf18df

View file

@ -82,7 +82,10 @@ public class TrackEditCard extends BaseCard {
}
GpxUiHelper.updateGpxInfoView(view, title, gpxInfo, dataItem, false, app);
if (gpxFile.getNonEmptySegmentsCount() > 1 && routeParams != null && routeParams.getSelectedSegment() != -1) {
if (gpxFile.getNonEmptySegmentsCount() > 1)
if (routeParams != null)
if (routeParams.getSelectedSegment() != -1)
if (gpxFile.getNonEmptySegmentsCount() > routeParams.getSelectedSegment()) {
TextView distanceView = view.findViewById(R.id.distance);
TextView timeView = view.findViewById(R.id.time);
ImageView timeIcon = view.findViewById(R.id.time_icon);