summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-10 17:03:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-10 17:03:35 +0000
commit54f86140d436ce2f457dc588f5b2c183d4e94452 (patch)
treefcdbc16dc792cdcfba7b28f607cec84a742d8e93 /xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
parenta408ac86ecad7086b3af6aa04d994cc4da16f52d (diff)
downloadpdfium-54f86140d436ce2f457dc588f5b2c183d4e94452.tar.xz
Verify GetOrCreate results are checked
This CL updates users of the GetOrCreate* methods to verify that the value returned is not null before accessing. Change-Id: I4a9fd29a26d5e4ec792ca3671c9868828e53d46e Reviewed-on: https://pdfium-review.googlesource.com/22652 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutpagemgr.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index 35a1bc8283..c5b7d52caa 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -290,6 +290,7 @@ bool CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
pTemplateNode->JSObject()->GetOrCreateProperty<CXFA_PageSet>(
0, XFA_Element::PageSet);
ASSERT(m_pTemplatePageSetRoot);
+
if (m_pPageSetLayoutItemRoot) {
m_pPageSetLayoutItemRoot->m_pParent = nullptr;
m_pPageSetLayoutItemRoot->m_pFirstChild = nullptr;