summaryrefslogtreecommitdiff
path: root/src/mbgl/text
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-12-14 14:58:06 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-12-20 08:30:39 -0800
commitdad57df38ef86363da9bff2e62f3fddc5688f0cf (patch)
tree361bff89dbee074d9c6313142a0df3de2b1dc69b /src/mbgl/text
parent3dcff6c3e11caa454893f44a300a3be0120325a3 (diff)
downloadqtlocation-mapboxgl-dad57df38ef86363da9bff2e62f3fddc5688f0cf.tar.gz
[core] Fix symbol rendering for multipoints
Ports https://github.com/mapbox/mapbox-gl-js/pull/3763 and https://github.com/mapbox/mapbox-gl-js/pull/3806.
Diffstat (limited to 'src/mbgl/text')
-rw-r--r--src/mbgl/text/get_anchors.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mbgl/text/get_anchors.cpp b/src/mbgl/text/get_anchors.cpp
index ce45e05d9c..b912c7763e 100644
--- a/src/mbgl/text/get_anchors.cpp
+++ b/src/mbgl/text/get_anchors.cpp
@@ -72,6 +72,7 @@ Anchors getAnchors(const GeometryCoordinates &line, float spacing,
const float maxAngle, const float textLeft, const float textRight,
const float iconLeft, const float iconRight,
const float glyphSize, const float boxScale, const float overscaling) {
+ if (line.empty()) return {};
// Resample a line to get anchor points for labels and check that each
// potential label passes text-max-angle check and has enough froom to fit