summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-09 09:59:02 -0800
committerLei Zhang <thestig@chromium.org>2015-11-09 09:59:02 -0800
commit8698aff8381399e82bafa892ed9f0e605065e45c (patch)
treebed6d00fd77f6617a29e114335a48172cb1d7b68 /core/src/fpdfapi/fpdf_page
parent4589243c204d6a8ef938f14d92c97b94aae38177 (diff)
downloadpdfium-8698aff8381399e82bafa892ed9f0e605065e45c.tar.xz
Merge to XFA: Add some nullptr checks that were missing from commit f7992b39.
BUG=pdfium:268 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425293010 . (cherry picked from commit a8f5b7b5e7501bdcfba585fc8af76c4a0fab22cb) Review URL: https://codereview.chromium.org/1418823008 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index 187d6152e9..9adfdb21a4 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -92,7 +92,7 @@ void CPDF_StreamContentParser::Handle_BeginImage() {
nonstd::unique_ptr<CPDF_Object, ReleaseDeleter<CPDF_Object>> pObj(
m_pSyntax->ReadNextObject());
if (!key.IsEmpty()) {
- FX_DWORD dwObjNum = pObj->GetObjNum();
+ FX_DWORD dwObjNum = pObj ? pObj->GetObjNum() : 0;
if (dwObjNum)
pDict->SetAtReference(key, m_pDocument, dwObjNum);
else