summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-03-11 17:33:17 +0000
committerCarl Hetherington <cth@carlh.net>2019-03-11 17:33:17 +0000
commit19d8aa3e21b74e576894a807d518b4cc23c1921f (patch)
tree5ef1e024cf26bfd0befbf8527a51a71036188728 /src
parent805753b411f906af219560c9ddc89a0bf58b8bc3 (diff)
Fix crash introduced by 6e5c998593842ff76f5d0ae5cab0d03cbe11b607.v2.13.128
Diffstat (limited to 'src')
-rw-r--r--src/lib/dcp_subtitle_decoder.cc20
1 files changed, 10 insertions, 10 deletions
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<dcp::SubtitleImage> ni = dynamic_pointer_cast<dcp::SubtitleImage>(*_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<dcp::SubtitleImage> ni = dynamic_pointer_cast<dcp::SubtitleImage>(*_next);
+ if (ni) {
+ emit_subtitle_image (p, *ni, film()->frame_size(), only_text());
+ ++_next;
+ }
}
}