From 3ffde1bc73156098e78e5e303b3f5198a1d073b8 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 10 Jan 2018 20:47:55 +0000 Subject: Rename GetTemplateNode to GetTemplateNodeIfExists This CL makes it explicit that GetTemplateNodeIfExists can return nullptr. Various call sites are updated as needed. Change-Id: If6edd5962b59e7e4ce3dbe9bbdc957783cf76abe Reviewed-on: https://pdfium-review.googlesource.com/22678 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_nodehelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_nodehelper.cpp') diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp index 6a090ffe96..c09d4f3c2d 100644 --- a/xfa/fxfa/parser/cxfa_nodehelper.cpp +++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp @@ -368,9 +368,9 @@ bool CXFA_NodeHelper::ResolveNodes_CreateNode(WideString wsName, } void CXFA_NodeHelper::SetCreateNodeType(CXFA_Node* refNode) { - if (!refNode) { + if (!refNode) return; - } + if (refNode->GetElementType() == XFA_Element::Subform) { m_eLastCreateType = XFA_Element::DataGroup; } else if (refNode->GetElementType() == XFA_Element::Field) { -- cgit v1.2.3