summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/cxfa_ffdoc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp
index 12e2a7b5f6..bc4a939078 100644
--- a/xfa/fxfa/cxfa_ffdoc.cpp
+++ b/xfa/fxfa/cxfa_ffdoc.cpp
@@ -116,11 +116,13 @@ bool CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
return false;
}
+ CFGAS_FontMgr* mgr = GetApp()->GetFDEFontMgr();
+ if (!mgr)
+ return false;
+
// At this point we've got an XFA document and we want to always return
// true to signify the load succeeded.
-
- m_pPDFFontMgr = pdfium::MakeUnique<CFGAS_PDFFontMgr>(
- GetPDFDoc(), GetApp()->GetFDEFontMgr());
+ m_pPDFFontMgr = pdfium::MakeUnique<CFGAS_PDFFontMgr>(GetPDFDoc(), mgr);
m_FormType = FormType::kXFAForeground;
CXFA_Node* pConfig = ToNode(m_pDocument->GetXFAObject(XFA_HASHCODE_Config));