Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1016)

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp

Issue 1528763003: Merge to XFA: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index eda51deb3b711d1750b5063feae34c97623309a8..5810da572bde7bb1df84347d8676abcc3c4cdebb 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -56,13 +56,13 @@ void CPDF_PageContentGenerate::GenerateContent() {
CFX_ByteString CPDF_PageContentGenerate::RealizeResource(
CPDF_Object* pResourceObj,
const FX_CHAR* szType) {
- if (m_pPage->m_pResources == NULL) {
+ if (!m_pPage->m_pResources) {
m_pPage->m_pResources = new CPDF_Dictionary;
int objnum = m_pDocument->AddIndirectObject(m_pPage->m_pResources);
m_pPage->m_pFormDict->SetAtReference("Resources", m_pDocument, objnum);
}
CPDF_Dictionary* pResList = m_pPage->m_pResources->GetDict(szType);
- if (pResList == NULL) {
+ if (!pResList) {
pResList = new CPDF_Dictionary;
m_pPage->m_pResources->SetAt(szType, pResList);
}

Powered by Google App Engine
This is Rietveld 408576698