summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/doc_ap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfdoc/doc_ap.cpp b/core/fpdfdoc/doc_ap.cpp
index 43dcfb4ac0..e64080dbd0 100644
--- a/core/fpdfdoc/doc_ap.cpp
+++ b/core/fpdfdoc/doc_ap.cpp
@@ -303,8 +303,8 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
pDRDict = pFormDict->GetDictBy("DR");
bUseFormRes = TRUE;
}
- CPDF_Dictionary* pDRFontDict = NULL;
- if (pDRDict && (pDRFontDict = pDRDict->GetDictBy("Font"))) {
+ CPDF_Dictionary* pDRFontDict = pDRDict ? pDRDict->GetDictBy("Font") : nullptr;
+ if (pDRFontDict) {
pFontDict = pDRFontDict->GetDictBy(sFontName.Mid(1));
if (!pFontDict && !bUseFormRes) {
pDRDict = pFormDict->GetDictBy("DR");