From 959f05190f52cab5c6d14abd486e8d754cbd9fe3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 15 Aug 2022 17:34:29 +0200 Subject: Tolerate missing FullContentTitleText (DoM bug #2295). --- src/cpl.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3