Index: fpdfsdk/src/fpdfppo.cpp |
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp |
index b8d2125b7dab667e0e0d9d50aa708474309757b6..a5c42756484063829d7314882b1e2c104743415d 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) |
{ |