diff options
author | Lei Zhang <thestig@chromium.org> | 2015-11-09 09:51:30 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-11-09 09:51:30 -0800 |
commit | a8f5b7b5e7501bdcfba585fc8af76c4a0fab22cb (patch) | |
tree | ee84f43d83d3337b4001ca50ef7360a1dbb1f5cb /core/src/fpdfapi/fpdf_parser | |
parent | 2ce28d26ad16e11828b19f602fcc0ff625a23345 (diff) | |
download | pdfium-a8f5b7b5e7501bdcfba585fc8af76c4a0fab22cb.tar.xz |
Add some nullptr checks that were missing from commit f7992b39.
BUG=pdfium:268
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1425293010 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 3 |
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 26f5595eaf..96f15ecb9d 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -852,7 +852,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); |