diff --git a/generator/maxspeeds_builder.cpp b/generator/maxspeeds_builder.cpp index d9c50da464..4bf9769f01 100644 --- a/generator/maxspeeds_builder.cpp +++ b/generator/maxspeeds_builder.cpp @@ -165,6 +165,12 @@ public: auto const osmID = GetOsmID(fid).GetSerialId(); + if (ft.GetGeomType() != GeomType::Line) + { + LOG(LWARNING, ("Non linear road with speed for way", osmID)); + return; + } + #define LOG_MAX_SPEED(msg) if (false) LOG(LINFO, msg) LOG_MAX_SPEED(("Start osmid =", osmID)); diff --git a/routing/geometry.cpp b/routing/geometry.cpp index 7cb8aa9e59..acfd5d5ee0 100644 --- a/routing/geometry.cpp +++ b/routing/geometry.cpp @@ -157,6 +157,7 @@ void RoadGeometry::Load(VehicleModelInterface const & vehicleModel, FeatureType geometry::Altitudes const * altitudes, RoadAttrsGetter & attrs) { size_t const count = feature.GetPointsCount(); + CHECK_GREATER(count, 1, ()); CHECK(altitudes == nullptr || altitudes->size() == count, ()); feature::TypesHolder types(feature);