diff options
author | Eimantas Vaiciunas <eimantas@walkingsmarts.com> | 2017-02-07 08:33:08 +0200 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2017-02-23 15:07:43 -0800 |
commit | 76b3825360843f3270549a02aca96f9f11892aa1 (patch) | |
tree | 8cadc0ee8f39e96be301f962349b1fe3fc2b40fc /src | |
parent | 6b0ad899b3ced4932cf600a4f89b2609512c98be (diff) | |
download | qtlocation-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.cpp | 2 |
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); |