summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-08-15 17:34:29 +0200
committerCarl Hetherington <cth@carlh.net>2022-08-15 17:34:29 +0200
commit959f05190f52cab5c6d14abd486e8d754cbd9fe3 (patch)
tree362aa9e562745f459b124a975b4be60a31e999c6 /src
parentfdf2d34c513dcf3ab36295e69e7e0c0766789ded (diff)
Tolerate missing FullContentTitleText (DoM bug #2295).v1.8.252295-tolerate-missing-full-content-title
Diffstat (limited to 'src')
-rw-r--r--src/cpl.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 79726f7f..1c449f8f 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -243,9 +243,13 @@ CPL::read_composition_metadata_asset (cxml::ConstNodePtr node)
{
_cpl_metadata_id = remove_urn_uuid(node->string_child("Id"));
- auto fctt = node->node_child("FullContentTitleText");
- _full_content_title_text = fctt->content();
- _full_content_title_text_language = fctt->optional_string_attribute("language");
+ /* FullContentTitleText is compulsory but in DoM #2295 we saw a commercial tool which
+ * apparently didn't include it, so as usual we have to be defensive.
+ */
+ if (auto fctt = node->optional_node_child("FullContentTitleText")) {
+ _full_content_title_text = fctt->content();
+ _full_content_title_text_language = fctt->optional_string_attribute("language");
+ }
_release_territory = node->optional_string_child("ReleaseTerritory");
if (_release_territory) {