From 71c0167b1976c24b5d26ad2ad4218151b3fe2aa2 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 25 Feb 2020 11:09:33 +0200 Subject: [PATCH] Fix possible npe --- OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 00a155c20f..bdea697a31 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -728,7 +728,10 @@ public class GpxSelectionHelper { } public List getPointsToDisplay() { - return joinSegments ? gpxFile.getGeneralTrack().segments : processedPointsToDisplay; + if (joinSegments && gpxFile != null && gpxFile.getGeneralTrack() != null) { + return gpxFile.getGeneralTrack().segments; + } + return processedPointsToDisplay; } public List getModifiablePointsToDisplay() {