From f8a6ce7ef5cc7e52aa10a6a133b4e628f3d2a50d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 9 Jun 2024 23:38:24 +0200 Subject: Fix an erroneous font ID error that can happen when loading projects from builds without release version tags. So that last_written_by_earlier_than() always returns true, check_font_ids() happens when it doesn't really need to. --- src/lib/dcp_content.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index bbe90d1a4..0aeb1d041 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -851,6 +851,11 @@ DCPContent::check_font_ids() return; } + /* This might be called on a TextContent that already has the correct fonts + * (e.g. if run from a build with a LastWrittenBy containing only a git hash) + * so we'll get an error if we don't clear them out first. + */ + text[0]->clear_fonts(); DCPExaminer examiner(shared_from_this(), true); examiner.add_fonts(text[0]); } -- cgit v1.2.3