diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index a4f7d7384..472956c35 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -27,6 +27,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed an issue in which a vector style layer predicate involving the `$id` key path would exclude all features from the layer. ([#7989](https://github.com/mapbox/mapbox-gl-native/pull/7989), [#7971](https://github.com/mapbox/mapbox-gl-native/pull/7971)) * Fixed an issue causing vector style layer predicates to be evaluated as if each feature had a `$type` attribute of 1, 2, or 3. The `$type` key path can now be compared to `Point`, `LineString`, or `Polygon`, as described in the documentation. ([#7971](https://github.com/mapbox/mapbox-gl-native/pull/7971)) * When setting an `MGLShapeSource`’s shape to an `MGLFeature` instance, any `UIColor` attribute value is now converted to the equivalent CSS string representation for use with `MGLInterpolationModeIdentity` in style functions. ([#8025](https://github.com/mapbox/mapbox-gl-native/pull/8025)) +* No exception is thrown when removing nonexistent layer from a style ([#7962](https://github.com/mapbox/mapbox-gl-native/pull/7962)) ### User interaction diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 8b05211c5..5e99abb1c 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -25,6 +25,7 @@ * Fixed an issue in which a vector style layer predicate involving the `$id` key path would exclude all features from the layer. ([#7989](https://github.com/mapbox/mapbox-gl-native/pull/7989), [#7971](https://github.com/mapbox/mapbox-gl-native/pull/7971)) * Fixed an issue causing vector style layer predicates to be evaluated as if each feature had a `$type` attribute of 1, 2, or 3. The `$type` key path can now be compared to `Point`, `LineString`, or `Polygon`, as described in the documentation. ([#7971](https://github.com/mapbox/mapbox-gl-native/pull/7971)) * When setting an `MGLShapeSource`’s shape to an `MGLFeature` instance, any `NSColor` attribute value is now converted to the equivalent CSS string representation for use with `MGLInterpolationModeIdentity` in style functions. ([#8025](https://github.com/mapbox/mapbox-gl-native/pull/8025)) +* No exception is thrown when removing nonexistent layer from a style ([#7962](https://github.com/mapbox/mapbox-gl-native/pull/7962)) ### User interaction diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp index 61fbba67b..0119dd3d8 100644 --- a/src/mbgl/style/style.cpp +++ b/src/mbgl/style/style.cpp @@ -231,7 +231,7 @@ std::unique_ptr Style::removeLayer(const std::string& id) { }); if (it == layers.end()) - throw std::runtime_error("no such layer"); + return nullptr; auto layer = std::move(*it);