[core] Protect against invalid geometries

This commit is contained in:
John Firebaugh
2016-06-24 11:25:08 -07:00
parent 3ccda59099
commit 3d16cd088f

View File

@@ -73,7 +73,8 @@ private:
converted.push_back(convertPoint(p));
}
if (type == geojsonvt::ProjectedFeatureType::Polygon && points.front() != points.back()) {
assert(points.size() > 0);
if (type == geojsonvt::ProjectedFeatureType::Polygon && points.size() > 0 && points.front() != points.back()) {
converted.push_back(converted.front());
}