From: Carl Hetherington Date: Mon, 11 Mar 2019 17:33:17 +0000 (+0000) Subject: Fix crash introduced by 6e5c998593842ff76f5d0ae5cab0d03cbe11b607. X-Git-Tag: v2.13.128^0 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=19d8aa3e21b74e576894a807d518b4cc23c1921f;p=dcpomatic.git Fix crash introduced by 6e5c998593842ff76f5d0ae5cab0d03cbe11b607. --- diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc index 5d5e1f631..3a182c0c7 100644 --- a/src/lib/dcp_subtitle_decoder.cc +++ b/src/lib/dcp_subtitle_decoder.cc @@ -78,16 +78,16 @@ DCPSubtitleDecoder::pass () if (ns) { s.push_back (*ns); ++_next; - } - - /* XXX: perhaps these image subs should also be collected together like the string ones are; - this would need to be done both here and in DCPDecoder. - */ - - shared_ptr ni = dynamic_pointer_cast(*_next); - if (ni) { - emit_subtitle_image (p, *ni, film()->frame_size(), only_text()); - ++_next; + } else { + /* XXX: perhaps these image subs should also be collected together like the string ones are; + this would need to be done both here and in DCPDecoder. + */ + + shared_ptr ni = dynamic_pointer_cast(*_next); + if (ni) { + emit_subtitle_image (p, *ni, film()->frame_size(), only_text()); + ++_next; + } } }