Don't create subtitle content if there is an empty fonts list.
authorCarl Hetherington <cth@carlh.net>
Sun, 21 Dec 2014 02:14:37 +0000 (02:14 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 21 Dec 2014 02:14:37 +0000 (02:14 +0000)
src/lib/writer.cc

index 512973f46fa4e4137a40f78d2ceb4e1911ee70d0..f844a139a7bd08a004755859da8e653c6a5a5cb4 100644 (file)
@@ -628,6 +628,10 @@ Writer::write (PlayerSubtitles subs)
 void
 Writer::write (list<shared_ptr<Font> > fonts)
 {
+       if (fonts.empty ()) {
+               return;
+       }
+       
        if (!_subtitle_content) {
                _subtitle_content.reset (new dcp::InteropSubtitleContent (_film->name(), _film->subtitle_language ()));
        }