summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r--core/fpdfapi/font/cpdf_type3font.cpp3
-rw-r--r--core/fpdfapi/font/cpdf_type3font.h6
2 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/font/cpdf_type3font.cpp b/core/fpdfapi/font/cpdf_type3font.cpp
index 79f6617ce3..1e8c567a7f 100644
--- a/core/fpdfapi/font/cpdf_type3font.cpp
+++ b/core/fpdfapi/font/cpdf_type3font.cpp
@@ -107,7 +107,8 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(uint32_t charcode) {
auto pNewChar =
pdfium::MakeUnique<CPDF_Type3Char>(pdfium::MakeUnique<CPDF_Form>(
- m_pDocument, m_pFontResources ? m_pFontResources : m_pPageResources,
+ m_pDocument,
+ m_pFontResources ? m_pFontResources.Get() : m_pPageResources.Get(),
pStream, nullptr));
// This can trigger recursion into this method. The content of |m_CacheMap|
diff --git a/core/fpdfapi/font/cpdf_type3font.h b/core/fpdfapi/font/cpdf_type3font.h
index 0bae192d61..135a19fb7c 100644
--- a/core/fpdfapi/font/cpdf_type3font.h
+++ b/core/fpdfapi/font/cpdf_type3font.h
@@ -48,9 +48,9 @@ class CPDF_Type3Font : public CPDF_SimpleFont {
void LoadGlyphMap() override {}
int m_CharWidthL[256];
- CPDF_Dictionary* m_pCharProcs;
- CPDF_Dictionary* m_pPageResources;
- CPDF_Dictionary* m_pFontResources;
+ CFX_UnownedPtr<CPDF_Dictionary> m_pCharProcs;
+ CFX_UnownedPtr<CPDF_Dictionary> m_pPageResources;
+ CFX_UnownedPtr<CPDF_Dictionary> m_pFontResources;
std::map<uint32_t, std::unique_ptr<CPDF_Type3Char>> m_CacheMap;
// The depth char loading is in, to avoid recurive calling LoadChar().
int m_CharLoadingDepth;