diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-11-20 00:40:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-11-20 23:47:03 +0100 |
| commit | bea1b9f9c77c721afd15bab392a86343f8d6b83a (patch) | |
| tree | f4cd3202194015538735abe642be355693756f0f | |
| parent | 60adc5a3312a9412b8988a0e2e82724779b5b84e (diff) | |
Fix potential crash if maybe_add_text() fails.
| -rw-r--r-- | src/lib/reel_writer.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc index a927770a5..c4df58fe7 100644 --- a/src/lib/reel_writer.cc +++ b/src/lib/reel_writer.cc @@ -602,8 +602,10 @@ ReelWriter::create_reel (list<ReferencedReelAsset> const & refs, list<shared_ptr shared_ptr<dcp::ReelClosedCaptionAsset> a = maybe_add_text<dcp::ReelClosedCaptionAsset> ( i->second, reel_picture_asset->actual_duration(), reel, refs, fonts, _film, _period ); - a->set_annotation_text (i->first.name); - a->set_language (i->first.language); + if (a) { + a->set_annotation_text (i->first.name); + a->set_language (i->first.language); + } } Film::Markers markers = _film->markers (); |
