summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cidfont.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-24 11:07:31 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-03-24 19:16:51 +0000
commit4a58d1427f8a1b105578f2d27391ceda238ca59c (patch)
tree95d526e6dbe8f37008eed21194190c54b1f7864a /core/fpdfapi/font/cpdf_cidfont.cpp
parent73b607fcb5f904893a0610b2c7fb8726d09379e6 (diff)
downloadpdfium-4a58d1427f8a1b105578f2d27391ceda238ca59c.tar.xz
Refcount CPDF_CMap all the time.chromium/3052chromium/3051
Change-Id: I85ea9529f4188bf818ee96c37944e4546411f79c Reviewed-on: https://pdfium-review.googlesource.com/3211 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_cidfont.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
index 217a6eaf2e..5aad5194cd 100644
--- a/core/fpdfapi/font/cpdf_cidfont.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont.cpp
@@ -365,9 +365,9 @@ bool CPDF_CIDFont::Load() {
if (!m_pCMap)
return false;
} else if (CPDF_Stream* pStream = pEncoding->AsStream()) {
- m_pCMap = pdfium::MakeUnique<CPDF_CMap>();
CPDF_StreamAcc acc;
acc.LoadAllData(pStream, false);
+ m_pCMap = pdfium::MakeRetain<CPDF_CMap>();
m_pCMap->LoadEmbedded(acc.GetData(), acc.GetSize());
} else {
return false;