- shared_ptr<SubtitleContent> s = dynamic_pointer_cast<SubtitleContent> (i);
- if (s) {
- BOOST_FOREACH (shared_ptr<Font> j, s->fonts ()) {
- for (int i = 0; i < FontFiles::VARIANTS; ++i) {
- optional<boost::filesystem::path> const p = j->file (static_cast<FontFiles::Variant> (i));
+ if (i->subtitle) {
+ BOOST_FOREACH (shared_ptr<Font> j, i->subtitle->fonts ()) {
+ for (int k = 0; k < FontFiles::VARIANTS; ++k) {
+ optional<boost::filesystem::path> const p = j->file (static_cast<FontFiles::Variant> (k));