summaryrefslogtreecommitdiff
path: root/src/lib/text_subtitle_content.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/text_subtitle_content.cc')
-rw-r--r--src/lib/text_subtitle_content.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/text_subtitle_content.cc b/src/lib/text_subtitle_content.cc
index 74e785ff7..4fdd690c3 100644
--- 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 ()));
}