Index: core/fpdfdoc/doc_ap.cpp |
diff --git a/core/fpdfdoc/doc_ap.cpp b/core/fpdfdoc/doc_ap.cpp |
index 43dcfb4ac04f70523639e2a25195f8dd8255b928..e64080dbd089486607bc5079c347a836626003d5 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"); |