glib/poppler-document.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
New commits: commit f5c981d70acfcc5742dda677b619431c483045b2 Author: Albert Astals Cid <[email protected]> Date: Sun Jan 5 01:04:58 2020 +0100 Use getUtf8Map otherwise the map pointer may go wrong diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc index 6615334c..15154bd6 100644 --- a/glib/poppler-document.cc +++ b/glib/poppler-document.cc @@ -2604,13 +2604,7 @@ static gchar * unicode_to_char (const Unicode *unicode, int len) { - static UnicodeMap *uMap = nullptr; - if (uMap == nullptr) { - GooString *enc = new GooString("UTF-8"); - uMap = globalParams->getUnicodeMap(enc); - uMap->incRefCnt (); - delete enc; - } + const UnicodeMap *uMap = globalParams->getUtf8Map(); GooString gstr; gchar buf[8]; /* 8 is enough for mapping an unicode char to a string */ _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
