1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

found change in Poppler ABI in the form of who has to do incRefCnt for CharCodeToUnicode objects

This commit is contained in:
Stephen Gaito 2019-07-03 13:16:41 +01:00
parent 1d39d5a3b6
commit 583c343d76

View File

@ -595,6 +595,11 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
bool name_conflict_warned = false; bool name_conflict_warned = false;
auto ctu = font->getToUnicode(); 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(cur_mapping.begin(), cur_mapping.end(), -1);
std::fill(width_list.begin(), width_list.end(), -1); std::fill(width_list.begin(), width_list.end(), -1);