diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-06-30 09:49:21 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-06-30 09:49:21 -0700 |
commit | 287e11a213d3197ac3e321acf294d903b271c269 (patch) | |
tree | 28f6f9dd00331c2748d73f96d818ce04a9775e8d /fpdfsdk/src/fpdf_transformpage.cpp | |
parent | ad30f609702d232f1708a0792d682c3cfaa0e235 (diff) | |
download | pdfium-287e11a213d3197ac3e321acf294d903b271c269.tar.xz |
Remove "this==NULL" and adjust corresponding callers
BUG=
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/361553002
Diffstat (limited to 'fpdfsdk/src/fpdf_transformpage.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_transformpage.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp index 729b1cd9bb..a666666d55 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; |