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

Unified Diff: fpdfsdk/src/fpdf_transformpage.cpp

Issue 361553002: Remove "this==NULL" and adjust corresponding callers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix if check warning Created 6 years, 6 months 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
« no previous file with comments | « fpdfsdk/src/fpdf_ext.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_transformpage.cpp
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index 729b1cd9bb98849b16b23eb90d2ab1cab9a6385b..a666666d55af00f4b2a6e27b4aaf57be9ac6f731 100644
--- a/fpdfsdk/src/fpdf_transformpage.cpp
+++ b/fpdfsdk/src/fpdf_transformpage.cpp
@@ -96,9 +96,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX
CPDF_Page* pPage = (CPDF_Page*)page;
CPDF_Dictionary* pPageDic = pPage->m_pFormDict;
- CPDF_Object* pContentObj = pPageDic->GetElement("Contents");
+ CPDF_Object* pContentObj = pPageDic ? pPageDic->GetElement("Contents") : NULL;
if(!pContentObj)
- pContentObj = pPageDic->GetArray("Contents");
+ pContentObj = pPageDic ? pPageDic->GetArray("Contents") : NULL;
if(!pContentObj)
return FALSE;
@@ -260,9 +260,9 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,FPDF_CLIPPATH clip
return;
CPDF_Page* pPage = (CPDF_Page*)page;
CPDF_Dictionary* pPageDic = pPage->m_pFormDict;
- CPDF_Object* pContentObj = pPageDic->GetElement("Contents");
+ CPDF_Object* pContentObj = pPageDic ? pPageDic->GetElement("Contents") : NULL;
if(!pContentObj)
- pContentObj = pPageDic->GetArray("Contents");
+ pContentObj = pPageDic ? pPageDic->GetArray("Contents") : NULL;
if(!pContentObj)
return;
« no previous file with comments | « fpdfsdk/src/fpdf_ext.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698