diff options
Diffstat (limited to 'platform/darwin/src/MGLSymbolStyleLayer.mm')
-rw-r--r-- | platform/darwin/src/MGLSymbolStyleLayer.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.mm b/platform/darwin/src/MGLSymbolStyleLayer.mm index 9ba1bd7bc2..0acc36d2dc 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.mm +++ b/platform/darwin/src/MGLSymbolStyleLayer.mm @@ -137,6 +137,9 @@ namespace mbgl { - (void)removeFromMapView:(MGLMapView *)mapView { auto removedLayer = mapView.mbglMap->removeLayer(self.identifier.UTF8String); + if (!removedLayer) { + return; + } _pendingLayer = std::move(reinterpret_cast<std::unique_ptr<mbgl::style::SymbolLayer> &>(removedLayer)); _rawLayer = _pendingLayer.get(); } |