From 8fb631417b82646bff30002c8d52fe4096126811 Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Thu, 14 Apr 2016 13:07:23 -0700 Subject: [PATCH] Abort processing if there are no snappable edges remaining. --- src/extractor/extractor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extractor/extractor.cpp b/src/extractor/extractor.cpp index 99f25aede..1b12b8575 100644 --- a/src/extractor/extractor.cpp +++ b/src/extractor/extractor.cpp @@ -555,6 +555,10 @@ void Extractor::BuildRTree(std::vector node_based_edge_list, in_iter++; } auto new_size = out_iter - node_based_edge_list.begin(); + if (new_size == 0) + { + throw util::exception("There are no snappable edges left after processing. Are you setting travel modes correctly in the profile? Cannot continue."); + } node_based_edge_list.resize(new_size); TIMER_START(construction);