Fix another crash with no subs.
authorCarl Hetherington <cth@carlh.net>
Thu, 14 Apr 2016 14:55:49 +0000 (15:55 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 18 May 2016 10:50:29 +0000 (11:50 +0100)
src/lib/dcp_content.cc

index b77c22714a2a00c48b4509343bae7b86c03cedc7..43b404f6004ac4c554b30eab2f9b162def8491f4 100644 (file)
@@ -173,7 +173,9 @@ DCPContent::as_xml (xmlpp::Node* node) const
        audio->as_xml (node);
        node->add_child("AudioFrameRate")->add_child_text (raw_convert<string> (audio->stream()->frame_rate()));
        audio->stream()->mapping().as_xml (node->add_child("AudioMapping"));
-       subtitle->as_xml (node);
+       if (subtitle) {
+               subtitle->as_xml (node);
+       }
 
        boost::mutex::scoped_lock lm (_mutex);
        node->add_child("Name")->add_child_text (_name);