summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfppo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdfppo.cpp')
-rw-r--r--fpdfsdk/src/fpdfppo.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index b8d2125b7d..a5c4275648 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -313,9 +313,17 @@ int CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPt
}
else
{
- CPDF_Object* pClone = pRef->GetDirect()->Clone();
- if(!pClone)
+ CPDF_Object* pDirect = pRef->GetDirect();
+ if(!pDirect)
+ {
+ return 0;
+ }
+
+ CPDF_Object* pClone = pDirect->Clone();
+ if(!pClone)
+ {
return 0;
+ }
if(pClone->GetType() == PDFOBJ_DICTIONARY)
{