summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-24 02:45:27 -0800
committerLei Zhang <thestig@chromium.org>2015-12-24 02:45:27 -0800
commit026ddb228b8107b345b6d0a48bffc62fd17b6adb (patch)
treec52fea5107e83feee88bd165f1a206222c3c9664 /core/src/fpdfapi/fpdf_edit
parentc7b4357a70235063a725a467da8758b3491c373c (diff)
downloadpdfium-026ddb228b8107b345b6d0a48bffc62fd17b6adb.tar.xz
Merge to XFA: Fix crash from commit f6dafc9.
BUG=571752 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1549073002 . (cherry picked from commit 56b56a86842e3e8f81dfefab994cca8934a3c4d4) Review URL: https://codereview.chromium.org/1542363002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 49ec0bae92..95415b18d1 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -1405,7 +1405,7 @@ void CPDF_Creator::InitNewObjNumOffsets() {
if (!pObj->IsModified()) {
continue;
}
- } else if (m_pParser->IsValidObjectNumber(objnum) &&
+ } else if (m_pParser && m_pParser->IsValidObjectNumber(objnum) &&
m_pParser->m_V5Type[objnum]) {
continue;
}
@@ -1434,7 +1434,7 @@ void CPDF_Creator::InitNewObjNumOffsets() {
FX_BOOL bNewStart = FALSE;
for (; i < iCount; i++) {
FX_DWORD dwCurObjNum = m_NewObjNumArray.ElementAt(i);
- bool bExist = m_pParser->IsValidObjectNumber(dwCurObjNum) &&
+ bool bExist = m_pParser && m_pParser->IsValidObjectNumber(dwCurObjNum) &&
m_ObjectOffset.GetPtrAt(dwCurObjNum);
if (bExist || dwCurObjNum - dwLastObjNum > 1) {
if (!bNewStart) {