From cc26618cf6847d49819332ceeaea6e3bc6d3ea6b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 25 Dec 2023 01:12:49 +0100 Subject: [PATCH] Don't crash when checking a DCP with no subtitles in some reel. --- src/lib/dcp_content.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 8d27406fe..b9b64149f 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -747,7 +747,7 @@ DCPContent::can_reference_text (shared_ptr film, TextType type, stri for (auto i: decoder->reels()) { if (type == TextType::OPEN_SUBTITLE) { - if (i->main_subtitle()->entry_point().get_value_or(0) != 0) { + if (i->main_subtitle() && i->main_subtitle()->entry_point().get_value_or(0) != 0) { /// TRANSLATORS: this string will follow "Cannot reference this DCP: " why_not = _("one of its subtitle reels has a non-zero entry point so it must be re-written."); return false; -- 2.30.2