Fix possible npe

This commit is contained in:
Vitaliy 2020-02-25 11:09:33 +02:00
parent 9a0dfac9a3
commit 71c0167b19

View file

@ -728,7 +728,10 @@ public class GpxSelectionHelper {
}
public List<TrkSegment> getPointsToDisplay() {
return joinSegments ? gpxFile.getGeneralTrack().segments : processedPointsToDisplay;
if (joinSegments && gpxFile != null && gpxFile.getGeneralTrack() != null) {
return gpxFile.getGeneralTrack().segments;
}
return processedPointsToDisplay;
}
public List<TrkSegment> getModifiablePointsToDisplay() {