summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfppo.cpp
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-06-30 09:49:21 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-06-30 09:49:21 -0700
commit287e11a213d3197ac3e321acf294d903b271c269 (patch)
tree28f6f9dd00331c2748d73f96d818ce04a9775e8d /fpdfsdk/src/fpdfppo.cpp
parentad30f609702d232f1708a0792d682c3cfaa0e235 (diff)
downloadpdfium-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/fpdfppo.cpp')
-rw-r--r--fpdfsdk/src/fpdfppo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index a803454cc0..032c3dba39 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -64,7 +64,7 @@ FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document *pDestPDFDoc, CPDF_Document
pNewRoot->SetAt("Type", new CPDF_Name("Catalog"));
}
- CPDF_Dictionary* pNewPages = (CPDF_Dictionary*)pNewRoot->GetElement("Pages")->GetDirect();
+ CPDF_Dictionary* pNewPages = (CPDF_Dictionary*)(pNewRoot->GetElement("Pages")? pNewRoot->GetElement("Pages")->GetDirect() : NULL);
if(!pNewPages)
{
pNewPages = new CPDF_Dictionary;
@@ -311,7 +311,8 @@ int CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPt
else
{
CPDF_Object* pClone = pRef->GetDirect()->Clone();
- if(!pClone) return 0;
+ if(!pClone)
+ return 0;
if(pClone->GetType() == PDFOBJ_DICTIONARY)
{