diff options
Diffstat (limited to 'src/mbgl/annotation/annotation_manager.cpp')
-rw-r--r-- | src/mbgl/annotation/annotation_manager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index e82dbfe48a..dd25792676 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -131,7 +131,9 @@ void AnnotationManager::updateStyle(Style& style) { } for (const auto& layer : obsoleteShapeAnnotationLayers) { - style.removeLayer(layer); + if (style.getLayer(layer)) { + style.removeLayer(layer); + } } obsoleteShapeAnnotationLayers.clear(); |