diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-21 22:09:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-21 22:09:04 +0100 |
| commit | 8ab408fbf7a8e5c56bd1402b545b402f65923790 (patch) | |
| tree | 8e05489c3e48e2fbdd8bba34b1a1bc7f487d24dd /src/lib | |
| parent | 6199e090dc1e32d3753ba7e7d7ea8c5f0d79f046 (diff) | |
Fix crash.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/film.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index fe7fcbfae..b56f85dbe 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -778,13 +778,17 @@ Film::isdcf_name (bool if_created_now) const bool vf = false; BOOST_FOREACH (shared_ptr<Content> i, content ()) { shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (i); + if (!dc) { + continue; + } + bool any_caption = false; for (int i = 0; i < CAPTION_COUNT; ++i) { if (dc->reference_caption(static_cast<CaptionType>(i))) { any_caption = true; } } - if (dc && (dc->reference_video() || dc->reference_audio() || any_caption)) { + if (dc->reference_video() || dc->reference_audio() || any_caption) { vf = true; } } |
