[poppler] glib/poppler-document.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jan 5 11:34:54 UTC 2020
glib/poppler-document.cc | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
New commits:
commit f5c981d70acfcc5742dda677b619431c483045b2
Author: Albert Astals Cid <aacid at kde.org>
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 */
More information about the poppler
mailing list