diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-11-02 12:31:50 -0700 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2017-11-02 12:58:21 -0700 |
commit | 8d609edd878099bb805746720b592fbea6383139 (patch) | |
tree | 4b9bd24f44533ae9dd258a7318597b3864074e62 | |
parent | 5bc98440c9d94c6e749340c91c6443c95f6a09bc (diff) | |
download | qtlocation-mapboxgl-8d609edd878099bb805746720b592fbea6383139.tar.gz |
Fix infinite loop when minZoom == 0.
-rw-r--r-- | src/mbgl/text/cross_tile_symbol_index.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/text/cross_tile_symbol_index.cpp b/src/mbgl/text/cross_tile_symbol_index.cpp index 5597e058ac..d641deefef 100644 --- a/src/mbgl/text/cross_tile_symbol_index.cpp +++ b/src/mbgl/text/cross_tile_symbol_index.cpp @@ -78,6 +78,9 @@ void CrossTileSymbolLayerIndex::addBucket(const OverscaledTileID& coord, SymbolB childIndex.second.findMatches(bucket.symbolInstances, coord); } } + if (z == 0) { + break; + } } // make this tile block duplicate labels in lower-res parent tiles @@ -90,6 +93,9 @@ void CrossTileSymbolLayerIndex::addBucket(const OverscaledTileID& coord, SymbolB parentIndex->second.findMatches(bucket.symbolInstances, coord); } } + if (z == 0) { + break; + } } for (auto& symbolInstance : bucket.symbolInstances) { |