diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-07-09 14:03:51 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-07-09 14:03:51 -0700 |
commit | b66432c91c35ef49d53377a250f42448bdd8fbf1 (patch) | |
tree | ed3ad64ad7326811a3cd21da4ec817e6b6745689 /core | |
parent | 532a6a7ece21ca4ea253a196bb5c61a1861d12a0 (diff) | |
download | pdfium-b66432c91c35ef49d53377a250f42448bdd8fbf1.tar.xz |
Fix a null object bug
BUG=387975
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/379273002
Diffstat (limited to 'core')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 2 |
1 files changed, 1 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 926117722f..b79aad6f23 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -1211,7 +1211,7 @@ CPDF_StreamAcc* CPDF_Parser::GetObjectStream(FX_DWORD objnum) if (m_ObjectStreamMap.Lookup((void*)(FX_UINTPTR)objnum, (void*&)pStreamAcc)) { return pStreamAcc; } - const CPDF_Stream* pStream = (CPDF_Stream*)m_pDocument->GetIndirectObject(objnum); + const CPDF_Stream* pStream = m_pDocument ? (CPDF_Stream*)m_pDocument->GetIndirectObject(objnum) : NULL; if (pStream == NULL || pStream->GetType() != PDFOBJ_STREAM) { return NULL; } |