summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_document.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index 2a825d7a9e..7641dbd702 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -329,8 +329,8 @@ const CPDF_Dictionary* CPDF_Document::GetPagesDict() const {
}
CPDF_Dictionary* CPDF_Document::GetPagesDict() {
- CPDF_Dictionary* pRoot = GetRoot();
- return pRoot ? pRoot->GetDictFor("Pages") : nullptr;
+ return const_cast<CPDF_Dictionary*>(
+ static_cast<const CPDF_Document*>(this)->GetPagesDict());
}
bool CPDF_Document::IsPageLoaded(int iPage) const {