projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Some allowances for video/audio/subtitle possibly being null.
[dcpomatic.git]
/
src
/
lib
/
text_subtitle_content.cc
diff --git
a/src/lib/text_subtitle_content.cc
b/src/lib/text_subtitle_content.cc
index 74e785ff7cc104b8cb7185ed0b4d80070a415ec3..4fdd690c370af4ad0f53aa3e46246ce96c998829 100644
(file)
--- a/
src/lib/text_subtitle_content.cc
+++ b/
src/lib/text_subtitle_content.cc
@@
-79,7
+79,11
@@
TextSubtitleContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("TextSubtitle");
Content::as_xml (node);
- subtitle->as_xml (node);
+
+ if (subtitle) {
+ subtitle->as_xml (node);
+ }
+
node->add_child("Length")->add_child_text (raw_convert<string> (_length.get ()));
}