diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-08-15 17:34:29 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-08-15 17:34:29 +0200 |
| commit | 959f05190f52cab5c6d14abd486e8d754cbd9fe3 (patch) | |
| tree | 362aa9e562745f459b124a975b4be60a31e999c6 /src/cpl.cc | |
| parent | fdf2d34c513dcf3ab36295e69e7e0c0766789ded (diff) | |
Tolerate missing FullContentTitleText (DoM bug #2295).v1.8.252295-tolerate-missing-full-content-title
Diffstat (limited to 'src/cpl.cc')
| -rw-r--r-- | src/cpl.cc | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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) { |
