The cause of this issue is that there is an indirect object like '112 0 R' but no...
authorJun Fang <jun_fang@foxitsoftware.com>
Mon, 8 Sep 2014 18:27:02 +0000 (11:27 -0700)
committerJun Fang <jun_fang@foxitsoftware.com>
Mon, 8 Sep 2014 18:27:02 +0000 (11:27 -0700)
BUG=390781
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/553613003

fpdfsdk/src/fpdfppo.cpp

index b8d2125..a5c4275 100644 (file)
@@ -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)
                {