Fix possible npe

(cherry picked from commit 71c0167b19)
This commit is contained in:
Vitaliy 2020-02-25 11:09:33 +02:00
parent f2b1040ebc
commit 2eb9b7d143

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() {