Return empty optional rather than asserting.
authorCarl Hetherington <cth@carlh.net>
Fri, 16 Feb 2024 22:46:27 +0000 (23:46 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 16 Feb 2024 22:46:28 +0000 (23:46 +0100)
src/lib/config.cc

index 1126d0bbd2fc7a64225c986eccb4385149413d39..7b4d67822736c9e9146b65560d52392e61c0a2d2 100644 (file)
@@ -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;
 }