summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_script_resolveprocessor.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_script_resolveprocessor.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_script_resolveprocessor.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_script_resolveprocessor.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index 6ea1a331c1..fa21a50b3e 100644
--- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
@@ -19,15 +19,12 @@
#include "xfa/fxfa/parser/xfa_utils.h"
CXFA_ResolveProcessor::CXFA_ResolveProcessor(void)
- : m_pNodeHelper(NULL), m_iCurStart(0) {
- m_pNodeHelper = new CXFA_NodeHelper;
-}
+ : m_pNodeHelper(new CXFA_NodeHelper), m_iCurStart(0) {}
+
CXFA_ResolveProcessor::~CXFA_ResolveProcessor(void) {
- if (m_pNodeHelper) {
- delete m_pNodeHelper;
- m_pNodeHelper = NULL;
- }
+ delete m_pNodeHelper;
}
+
int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) {
if (rnd.m_CurNode == NULL) {
return -1;