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);