Fix segfault resulting from an invalid geometry.
This commit is contained in:
committed by
Thiago Marcos P. Santos
parent
0d0ae229eb
commit
40cfb77b7d
@@ -695,8 +695,11 @@ void SymbolLayout::addFeature(const std::size_t layoutFeatureIndex,
|
||||
}
|
||||
} else if (type == FeatureType::LineString) {
|
||||
for (const auto& line : feature.geometry) {
|
||||
Anchor anchor(line[0].x, line[0].y, 0, minScale);
|
||||
addSymbolInstance(anchor, createSymbolInstanceSharedData(line));
|
||||
// Skip invalid LineStrings.
|
||||
if (line.size() > 0) {
|
||||
Anchor anchor(line[0].x, line[0].y, 0, minScale);
|
||||
addSymbolInstance(anchor, createSymbolInstanceSharedData(line));
|
||||
}
|
||||
}
|
||||
} else if (type == FeatureType::Point) {
|
||||
for (const auto& points : feature.geometry) {
|
||||
|
||||
Reference in New Issue
Block a user