Index: core/src/fpdfdoc/doc_ap.cpp |
diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp |
index 094733fdb36f5bcbade6e99397cbacc314b62857..9e86c3f0460b667eb3867a39330e3277b4549bf8 100644 |
--- a/core/src/fpdfdoc/doc_ap.cpp |
+++ b/core/src/fpdfdoc/doc_ap.cpp |
@@ -292,7 +292,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, |
FX_BOOL bUseFormRes = FALSE; |
CPDF_Dictionary* pFontDict = NULL; |
CPDF_Dictionary* pDRDict = pAnnotDict->GetDict("DR"); |
- if (pDRDict == NULL) { |
+ if (!pDRDict) { |
pDRDict = pFormDict->GetDict("DR"); |
bUseFormRes = TRUE; |
} |
@@ -312,7 +312,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, |
} |
if (!pFontDict) { |
pFontDict = CPDF_Dictionary::Create(); |
- if (pFontDict == NULL) { |
+ if (!pFontDict) { |
return FALSE; |
} |
pFontDict->SetAtName("Type", "Font"); |
@@ -418,9 +418,9 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, |
rcBBox.right - fBorderWidth, rcBBox.top - fBorderWidth); |
rcBody.Normalize(); |
CPDF_Dictionary* pAPDict = pAnnotDict->GetDict("AP"); |
- if (pAPDict == NULL) { |
+ if (!pAPDict) { |
pAPDict = CPDF_Dictionary::Create(); |
- if (pAPDict == NULL) { |
+ if (!pAPDict) { |
Tom Sepez
2015/12/14 18:27:00
nit: can this fail? I though I fixed these. hmmm.
Lei Zhang
2015/12/15 01:58:35
I thought I fixed these too.
|
return FALSE; |
} |
pAnnotDict->SetAt("AP", pAPDict); |
@@ -440,7 +440,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, |
CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDict("Font"); |
if (!pStreamResFontList) { |
pStreamResFontList = CPDF_Dictionary::Create(); |
- if (pStreamResFontList == NULL) { |
+ if (!pStreamResFontList) { |
return FALSE; |
} |
pStreamResList->SetAt("Font", pStreamResFontList); |
@@ -688,7 +688,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, |
CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDict("Font"); |
if (!pStreamResFontList) { |
pStreamResFontList = CPDF_Dictionary::Create(); |
- if (pStreamResFontList == NULL) { |
+ if (!pStreamResFontList) { |
return FALSE; |
} |
pStreamResList->SetAt("Font", pStreamResFontList); |