summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp
index f066117fe9..aac233e293 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -1168,11 +1168,12 @@ CPDF_DataAvail::DocAvailStatus CPDF_DataAvail::CheckLinearizedData() {
if (m_bLinearedDataOK)
return DataAvailable;
ASSERT(m_pLinearized);
- if (!m_pLinearized->GetMainXRefTableFirstEntryOffset())
+ if (!m_pLinearized->GetMainXRefTableFirstEntryOffset() || !m_pDocument ||
+ !m_pDocument->GetParser() || !m_pDocument->GetParser()->GetTrailer()) {
return DataError;
+ }
if (!m_bMainXRefLoadTried) {
- ASSERT(m_pDocument->GetParser()->GetTrailer());
const FX_SAFE_FILESIZE main_xref_offset =
m_pDocument->GetParser()->GetTrailer()->GetIntegerFor("Prev");
if (!main_xref_offset.IsValid())