summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index e49835496c..e8b300027c 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -851,7 +851,8 @@ FX_BOOL CPDF_Parser::RebuildCrossRef() {
CFX_ByteString key;
CPDF_Object* pElement =
pTrailer->GetNextElement(pos, key);
- FX_DWORD dwObjNum = pElement->GetObjNum();
+ FX_DWORD dwObjNum =
+ pElement ? pElement->GetObjNum() : 0;
if (dwObjNum) {
m_pTrailer->SetAtReference(key, m_pDocument,
dwObjNum);