summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-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) {