diff options
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 7da4ed551d..3399023037 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -1158,14 +1158,8 @@ void CXFA_Node::InsertChild(int32_t index, CXFA_Node* pNode) { return; ASSERT(!pNode->xml_node_->GetParent()); - - xml_node_->InsertChildNode(pNode->xml_node_.Get(), index); - if (pNode->xml_node_.IsOwned()) { - // We remove ownership of the XML node from pNode and transfer the ownership - // into the XML tree, the pNode still has an unowned pointer to the XML - // node. - pNode->xml_node_.Release().release(); - } + ASSERT(pNode->xml_node_.IsOwned()); + xml_node_->InsertChildNode(pNode->xml_node_.Release(), index); } void CXFA_Node::InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode) { |