From d6e8b54b2b60f70f1a8837183bc184809977be67 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 27 Jun 2024 20:14:31 +0200 Subject: Fix error when importing bad subtitle file (#2838). The subtitle XML refers to a font with no corresponding . --- src/lib/font_id_allocator.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/font_id_allocator.cc b/src/lib/font_id_allocator.cc index 112dd262b..5e4ae9c0f 100644 --- a/src/lib/font_id_allocator.cc +++ b/src/lib/font_id_allocator.cc @@ -116,7 +116,9 @@ string FontIDAllocator::font_id(int reel_index, string asset_id, string font_id) const { auto iter = _map.find(Font(reel_index, asset_id, font_id)); - DCPOMATIC_ASSERT(iter != _map.end()); + if (iter == _map.end()) { + return default_font_id(); + } return String::compose("%1_%2", iter->second, font_id); } -- cgit v1.2.3