[core, ios, macos] Return null when removing nonexistent source

This commit is contained in:
Jesse Bounds
2017-02-20 15:06:46 -08:00
parent e860fa6f0a
commit c0718a863d
5 changed files with 30 additions and 7 deletions

View File

@@ -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);