summaryrefslogtreecommitdiff
path: root/src/lib/dcp_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-06-09 23:38:24 +0200
committerCarl Hetherington <cth@carlh.net>2024-06-09 23:38:24 +0200
commitf8a6ce7ef5cc7e52aa10a6a133b4e628f3d2a50d (patch)
treeadb47e7e84afe06d385a9bc1b5aeca6bc330ba49 /src/lib/dcp_content.cc
parent530e62b470df2a0ab9b6173f18d87ae85c499234 (diff)
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.
Diffstat (limited to 'src/lib/dcp_content.cc')
-rw-r--r--src/lib/dcp_content.cc5
1 files changed, 5 insertions, 0 deletions
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]);
}