summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/src/fpdfppo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 032c3dba39..b8d2125b7d 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -215,8 +215,11 @@ CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag(CPDF_Dictionary *pDic
{
if(pp->KeyExist((const char*)nSrctag))
return pp->GetElement((const char*)nSrctag);
- else if(pp->KeyExist("Parent"))
+ else if (pp->KeyExist("Parent"))
+ {
pp = (CPDF_Dictionary*)pp->GetElement("Parent")->GetDirect();
+ if (pp->GetType() == PDFOBJ_NULL) break;
+ }
else break;
}