summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2018-08-25 14:13:35 +0200
committermvglasow <michael -at- vonglasow.com>2018-08-25 14:13:35 +0200
commit9e746d0ba0f0be36b10cfa4b92962ed976fccb2f (patch)
tree64ca3833e1b9654001829dcf15007f48da8a032b
parent964315b9c3721c1c52796386fdde0ddd83827dd4 (diff)
downloadnavit-9e746d0ba0f0be36b10cfa4b92962ed976fccb2f.tar.gz
Fix:traffic:Fix missing second half for certain three-point locations
Signed-off-by: mvglasow <michael -at- vonglasow.com>
-rw-r--r--navit/traffic.c8
1 files changed, 4 insertions, 4 deletions
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)