From 583c343d768b64801d1e150109cc339e47fb1b00 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 3 Jul 2019 13:16:41 +0100 Subject: [PATCH] found change in Poppler ABI in the form of who has to do incRefCnt for CharCodeToUnicode objects --- src/HTMLRenderer/font.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/HTMLRenderer/font.cc b/src/HTMLRenderer/font.cc index 03e215e..301bf30 100644 --- a/src/HTMLRenderer/font.cc +++ b/src/HTMLRenderer/font.cc @@ -595,6 +595,11 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo bool name_conflict_warned = false; auto ctu = font->getToUnicode(); + // NOTE: Poppler has changed its effective ABI + // in now expects the USER to increment any ref counters + assert(ctu); + ((CharCodeToUnicode *)ctu)->incRefCnt(); + std::fill(cur_mapping.begin(), cur_mapping.end(), -1); std::fill(width_list.begin(), width_list.end(), -1);