summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEimantas Vaiciunas <eimantas@walkingsmarts.com>2017-02-07 08:33:08 +0200
committerJesse Bounds <jesse@rebounds.net>2017-02-23 15:07:43 -0800
commit76b3825360843f3270549a02aca96f9f11892aa1 (patch)
tree8cadc0ee8f39e96be301f962349b1fe3fc2b40fc /src
parent6b0ad899b3ced4932cf600a4f89b2609512c98be (diff)
downloadqtlocation-mapboxgl-76b3825360843f3270549a02aca96f9f11892aa1.tar.gz
[core] Return null when removing nonexistent layer
In case of exception, silently ignore removal of nonexistent layer and return nullptr
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/style.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index 61fbba67b5..0119dd3d8d 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -231,7 +231,7 @@ std::unique_ptr<Layer> Style::removeLayer(const std::string& id) {
});
if (it == layers.end())
- throw std::runtime_error("no such layer");
+ return nullptr;
auto layer = std::move(*it);