diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-16 23:46:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-02-16 23:46:28 +0100 |
| commit | 4cb737852e5f1db699a3cede57788a65db0edc6d (patch) | |
| tree | 2957f6f1eb7442231d912c2b54fed87e7d2b0ed0 /src | |
| parent | 14dbb8c14df912961654f6073aacce0a6a209ba1 (diff) | |
Return empty optional rather than asserting.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/config.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 1126d0bbd..7b4d67822 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -1645,7 +1645,9 @@ optional<boost::filesystem::path> Config::initial_path(string id) const { auto iter = _initial_paths.find(id); - DCPOMATIC_ASSERT(iter != _initial_paths.end()); + if (iter == _initial_paths.end()) { + return {}; + } return iter->second; } |
