summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-14 15:04:43 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commit8739ffa1e3937da67da3112b9bc73cc2936afd84 (patch)
tree03775ed69b242519a73fa105b7d00ac77d28629f /src/lib
parentd7e14062764e1bbe81a7a85e69d0233f371cbd59 (diff)
Fix crash on DCP content with no subs.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dcp_content.cc7
1 files changed, 5 insertions, 2 deletions
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 ();
}