Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: xfa/fxfa/parser/xfa_script_resolveprocessor.cpp

Issue 1925363002: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_script_imp.cpp ('k') | xfa/fxgraphics/cagg_graphics.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index 6ea1a331c197ab9ed8c5883c8c27658868e85990..fa21a50b3e2eb33b610cefe7495a5222a3d3a950 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;
« no previous file with comments | « xfa/fxfa/parser/xfa_script_imp.cpp ('k') | xfa/fxgraphics/cagg_graphics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698