summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_mgr.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-20 10:43:15 -0700
committerLei Zhang <thestig@chromium.org>2015-10-20 10:43:15 -0700
commit444ed783c014bbbde2eda7a25cf42bfc2234d7a8 (patch)
tree8acd0842faeed065ef12e1a528293c87222e82d4 /fpdfsdk/src/fsdk_mgr.cpp
parent937840e1722d1f2b77d80575d6e710d760662c9c (diff)
downloadpdfium-444ed783c014bbbde2eda7a25cf42bfc2234d7a8.tar.xz
Revert "Make CFX_FontMgr member variables private."
This reverts commit c29bee029cd5fe3f8a4ceb580235ac2d0e5ce8fd. because it broke corpus tests. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1410733005 .
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 5d765a495d..883ad60a93 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -145,22 +145,20 @@ FX_BOOL CFX_SystemHandler::FindNativeTrueTypeFont(
int32_t nCharset,
CFX_ByteString sFontFaceName) {
CFX_FontMgr* pFontMgr = CFX_GEModule::Get()->GetFontMgr();
- if (!pFontMgr)
- return FALSE;
-
- CFX_FontMapper* pFontMapper = pFontMgr->GetBuiltinMapper();
- if (!pFontMapper)
- return FALSE;
-
- int nSize = pFontMapper->m_InstalledTTFonts.GetSize();
- if (nSize == 0) {
- pFontMapper->LoadInstalledFonts();
- nSize = pFontMapper->m_InstalledTTFonts.GetSize();
- }
+ if (pFontMgr) {
+ CFX_FontMapper* pFontMapper = pFontMgr->m_pBuiltinMapper;
+ if (pFontMapper) {
+ int nSize = pFontMapper->m_InstalledTTFonts.GetSize();
+ if (nSize == 0) {
+ pFontMapper->LoadInstalledFonts();
+ nSize = pFontMapper->m_InstalledTTFonts.GetSize();
+ }
- for (int i = 0; i < nSize; ++i) {
- if (pFontMapper->m_InstalledTTFonts[i].Compare(sFontFaceName))
- return TRUE;
+ for (int i = 0; i < nSize; i++) {
+ if (pFontMapper->m_InstalledTTFonts[i].Compare(sFontFaceName))
+ return TRUE;
+ }
+ }
}
return FALSE;