summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-12-25 01:12:49 +0100
committerCarl Hetherington <cth@carlh.net>2024-01-04 23:35:43 +0100
commitcc26618cf6847d49819332ceeaea6e3bc6d3ea6b (patch)
treebcb2673b3c53d47892f287253ff2afa7ae4076fe
parenta7fa260fb46d40bca1e0faf3210a0c260316a8ad (diff)
Don't crash when checking a DCP with no subtitles in some reel.
-rw-r--r--src/lib/dcp_content.cc2
1 files changed, 1 insertions, 1 deletions
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<const Film> 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;