From bea1b9f9c77c721afd15bab392a86343f8d6b83a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 20 Nov 2020 00:40:02 +0100 Subject: [PATCH] Fix potential crash if maybe_add_text() fails. --- src/lib/reel_writer.cc | 6 ++++-- 1 file 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 const & refs, list a = maybe_add_text ( 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 (); -- 2.30.2