Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1029)

Unified Diff: fpdfsdk/src/fpdfppo.cpp

Issue 469573002: Treat null Parent as no Parent for dictionary objects (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Tabify Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfppo.cpp
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 032c3dba397c4f7e627c92a942bcb274763f4e9c..b8d2125b7dab667e0e0d9d50aa708474309757b6 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698