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

Unified Diff: xfa/fxfa/parser/xfa_parser_imp.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_locale.cpp ('k') | xfa/fxfa/parser/xfa_script_imp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_parser_imp.cpp
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index 7eef2bd4037c6b985843645b0b64145f2749c4a9..23a8dbc9256d700226ea3e53a6681232a4da2143 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),
« no previous file with comments | « xfa/fxfa/parser/xfa_locale.cpp ('k') | xfa/fxfa/parser/xfa_script_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698