Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'generator')
-rw-r--r--generator/routing_generator.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/generator/routing_generator.cpp b/generator/routing_generator.cpp
index d680ad1259..053fe02aaa 100644
--- a/generator/routing_generator.cpp
+++ b/generator/routing_generator.cpp
@@ -119,10 +119,14 @@ void FindCrossNodes(osrm::NodeDataVectorT const & nodeData, gen::OsmID2FeatureID
if (outStart == outEnd)
continue;
- border.FindIntersection(MercatorBounds::FromLatLon(segment.lat1, segment.lon1),
- MercatorBounds::FromLatLon(segment.lat2, segment.lon2),
- intersection);
+ if (!border.FindIntersection(MercatorBounds::FromLatLon(segment.lat1, segment.lon1),
+ MercatorBounds::FromLatLon(segment.lat2, segment.lon2),
+ intersection))
+ {
+ ASSERT(false, ("Can't determine a intersection point with a border!"));
+ continue;
+ }
// for old format compatibility
intersection = m2::PointD(MercatorBounds::XToLon(intersection.x), MercatorBounds::YToLat(intersection.y));
if (!outStart && outEnd)