[core] Don't crash when removing a shape annotation whose layer was never created
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user