Fix out of bounds

This commit is contained in:
max-klaus 2020-02-24 15:06:37 +03:00
parent 89504b92df
commit e38821740b

View file

@ -272,8 +272,9 @@ public class GpxUiHelper {
} }
for (SelectedGpxFile selectedGpx : selectedGpxFiles) { for (SelectedGpxFile selectedGpx : selectedGpxFiles) {
if (!selectedGpx.getGpxFile().showCurrentTrack) { GPXFile gpxFile = selectedGpx.getGpxFile();
list.add(new GPXInfo(selectedGpx.getGpxFile().path.substring(gpxDirLength + 1), selectedGpx.getGpxFile().modifiedTime, 0)); if (!gpxFile.showCurrentTrack && gpxFile.path.length() > gpxDirLength + 1) {
list.add(new GPXInfo(gpxFile.path.substring(gpxDirLength + 1), gpxFile.modifiedTime, 0));
} }
} }