diff --git a/src/renderer/symbol_bucket.cpp b/src/renderer/symbol_bucket.cpp index e8c0fd182..f953f0716 100644 --- a/src/renderer/symbol_bucket.cpp +++ b/src/renderer/symbol_bucket.cpp @@ -296,7 +296,7 @@ void SymbolBucket::addFeature(const std::vector &line, const Shaping } // Insert final placement into collision tree and add glyphs/icons to buffers - if (glyphScale) { + if (glyphScale && std::isfinite(glyphScale)) { if (!properties.text.ignore_placement) { collision.insert(glyphPlacement.boxes, anchor, glyphScale, glyphRange, horizontalText); @@ -304,7 +304,7 @@ void SymbolBucket::addFeature(const std::vector &line, const Shaping if (inside) addSymbols(text, glyphPlacement.shapes, glyphScale, glyphRange); } - if (iconScale) { + if (iconScale && std::isfinite(iconScale)) { if (!properties.icon.ignore_placement) { collision.insert(iconPlacement.boxes, anchor, iconScale, iconRange, horizontalIcon); }