From 5a2813e54c433e60a44ee85903bd5ed0f5e60c05 Mon Sep 17 00:00:00 2001 From: cepprice Date: Tue, 13 Apr 2021 15:43:29 +0500 Subject: [PATCH] Fix for general segments and segments with one point --- .../src/main/java/net/osmand/router/RouteColorize.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RouteColorize.java b/OsmAnd-java/src/main/java/net/osmand/router/RouteColorize.java index 6abb9c47c0..6a0c5c5794 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RouteColorize.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteColorize.java @@ -106,6 +106,10 @@ public class RouteColorize { } for (Track t : gpxFile.tracks) { for (TrkSegment ts : t.segments) { + if (ts.generalSegment || ts.points.size() < 2) { + continue; + } + for (WptPt p : ts.points) { latList.add(p.lat); lonList.add(p.lon);