From 9e746d0ba0f0be36b10cfa4b92962ed976fccb2f Mon Sep 17 00:00:00 2001 From: mvglasow Date: Sat, 25 Aug 2018 14:13:35 +0200 Subject: Fix:traffic:Fix missing second half for certain three-point locations Signed-off-by: mvglasow --- navit/traffic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'navit/traffic.c') diff --git a/navit/traffic.c b/navit/traffic.c index a755edf87..9c3965b3f 100644 --- a/navit/traffic.c +++ b/navit/traffic.c @@ -1762,13 +1762,13 @@ static struct route_graph_point * traffic_route_flood_graph(struct route_graph * return NULL; /* store points of existing route */ - /* TODO - * Is it correct to exclude the last point (seg==NULL) from the heap? - * Doing so has worked for the cases tested, is this always true? */ if (start_existing) { p = start_existing; while (p) { - existing = g_list_prepend(existing, p); + /* Do not exclude the last point (seg==NULL) from the heap as that may result in the existing route not + * being joined properly to the new one */ + if (p->seg) + existing = g_list_prepend(existing, p); if (!p->seg) p = NULL; else if (p == p->seg->start) -- cgit v1.2.1