summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-09-28 18:14:15 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-09-28 15:24:28 +0000
commit94df367590a2ccd4f799df8958ddc014f496edb1 (patch)
treee1e3ca41b61ab7cd07e843bae53f0bcd6b18c25a /core
parent0ec10f94ae0ec1927c4a33cd69eac0a5fbdcbd52 (diff)
downloadpdfium-94df367590a2ccd4f799df8958ddc014f496edb1.tar.xz
Fix load non first pages in linearized document with hints table.
Tha problem was, that when we use hints tables, we do not check pages tree availability, but currently for receiving page object in CPDF_Document, the pages tree should be available anyway. Change-Id: I908d00027fd8727f074a38e47fea095229ef5147 Reviewed-on: https://pdfium-review.googlesource.com/11892 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp
index ec865ba936..1db0470f37 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -1316,8 +1316,10 @@ CPDF_DataAvail::DocAvailStatus CPDF_DataAvail::IsPageAvail(
nResult = m_pHintTables->CheckPage(dwPage);
if (nResult != DataAvailable)
return nResult;
- m_pagesLoadState.insert(dwPage);
- return GetPage(dwPage) ? DataAvailable : DataError;
+ if (GetPage(dwPage)) {
+ m_pagesLoadState.insert(dwPage);
+ return DataAvailable;
+ }
}
if (!m_bMainXRefLoadedOK) {