From aae2f02038b1cd36e1b1bf2e4f0821e86cff2841 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 20 Apr 2023 14:56:30 +0200 Subject: Fix crash when trying to verify an encrypted SMPTE subtitle asset. --- src/verify.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/verify.cc b/src/verify.cc index 6a1cbd2d..b49695c7 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -810,7 +810,8 @@ verify_subtitle_asset ( if (smpte) { verify_smpte_timed_text_asset (smpte, reel_asset_duration, notes); verify_smpte_subtitle_asset (smpte, notes, state); - if (namespace_count(asset, "SubtitleReel") > 1) { + /* This asset may be encrypted and in that case we'll have no raw_xml() */ + if (asset->raw_xml() && namespace_count(asset, "SubtitleReel") > 1) { notes.push_back({ VerificationNote::Type::WARNING, VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT, asset->id()}); } } -- cgit v1.2.3