From 8739ffa1e3937da67da3112b9bc73cc2936afd84 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 14 Apr 2016 15:04:43 +0100 Subject: Fix crash on DCP content with no subs. --- src/lib/dcp_content.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 7a2d350de..b77c22714 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -199,8 +199,11 @@ string DCPContent::identifier () const { SafeStringStream s; - s << Content::identifier() << "_" << video->identifier() << "_" << subtitle->identifier () << " " - << (_reference_video ? "1" : "0") + s << Content::identifier() << "_" << video->identifier() << "_"; + if (subtitle) { + s << subtitle->identifier () << " "; + } + s << (_reference_video ? "1" : "0") << (_reference_subtitle ? "1" : "0"); return s.str (); } -- cgit v1.2.3