diff options
author | Jesse Bounds <jesse@rebounds.net> | 2017-02-20 15:06:46 -0800 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2017-02-23 15:07:43 -0800 |
commit | c0718a863d0a915641857bc9cd4ff51cd508f222 (patch) | |
tree | 0d63485afba44e45d4dbb21492d25a36591f7089 /src | |
parent | e860fa6f0a71805dafd03a1ac02980369b799f9e (diff) | |
download | qtlocation-mapboxgl-c0718a863d0a915641857bc9cd4ff51cd508f222.tar.gz |
[core, ios, macos] Return null when removing nonexistent source
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 0119dd3d8d..b6f14ecf4b 100644 --- a/src/mbgl/style/style.cpp +++ b/src/mbgl/style/style.cpp @@ -159,7 +159,7 @@ std::unique_ptr<Source> Style::removeSource(const std::string& id) { }); if (it == sources.end()) { - throw std::runtime_error("no such source"); + return nullptr; } auto source = std::move(*it); |