summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_parser_imp.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-28 17:29:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-28 17:29:19 -0700
commit495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch)
tree42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fxfa/parser/xfa_parser_imp.cpp
parenta31098417852bdf13e693a6e0913e0706cf94098 (diff)
downloadpdfium-495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc.tar.xz
Do not check pointers before deleting them.
XFA edition. Review-Url: https://codereview.chromium.org/1925363002
Diffstat (limited to 'xfa/fxfa/parser/xfa_parser_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index 7eef2bd403..23a8dbc925 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.cpp
+++ b/xfa/fxfa/parser/xfa_parser_imp.cpp
@@ -1390,13 +1390,13 @@ void CXFA_DocumentParser::ConstructXFANode(CXFA_Node* pXFANode,
m_pDocument->SetRoot(pRootNode);
}
}
+
void CXFA_DocumentParser::CloseParser() {
- if (m_pDocument) {
- delete m_pDocument;
- m_pDocument = NULL;
- }
+ delete m_pDocument;
+ m_pDocument = nullptr;
m_nodeParser.CloseParser();
}
+
CXFA_XMLParser::CXFA_XMLParser(CFDE_XMLNode* pRoot, IFX_Stream* pStream)
: m_nElementStart(0),
m_dwCheckStatus(0),