summaryrefslogtreecommitdiff
path: root/src/mbgl/text/cross_tile_symbol_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/text/cross_tile_symbol_index.cpp')
-rw-r--r--src/mbgl/text/cross_tile_symbol_index.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mbgl/text/cross_tile_symbol_index.cpp b/src/mbgl/text/cross_tile_symbol_index.cpp
index 8df26ca117..58dcda46f5 100644
--- a/src/mbgl/text/cross_tile_symbol_index.cpp
+++ b/src/mbgl/text/cross_tile_symbol_index.cpp
@@ -178,9 +178,12 @@ bool CrossTileSymbolIndex::addLayer(RenderSymbolLayer& symbolLayer, float lng) {
continue;
}
- auto bucket = renderTile.tile.getBucket(*symbolLayer.baseImpl);
- assert(dynamic_cast<SymbolBucket*>(bucket));
- SymbolBucket& symbolBucket = *reinterpret_cast<SymbolBucket*>(bucket);
+ auto bucket = dynamic_cast<SymbolBucket*>(renderTile.tile.getBucket(*symbolLayer.baseImpl));
+ if (!bucket) {
+ continue;
+ }
+ SymbolBucket& symbolBucket = *bucket;
+
if (symbolBucket.bucketLeaderID != symbolLayer.getID()) {
// Only add this layer if it's the "group leader" for the bucket
continue;