diff options
author | thestig <thestig@chromium.org> | 2016-04-28 17:29:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-28 17:29:19 -0700 |
commit | 495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch) | |
tree | 42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fxfa/parser/xfa_locale.cpp | |
parent | a31098417852bdf13e693a6e0913e0706cf94098 (diff) | |
download | pdfium-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_locale.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_locale.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp index ee6d289a25..ff0371bc88 100644 --- a/xfa/fxfa/parser/xfa_locale.cpp +++ b/xfa/fxfa/parser/xfa_locale.cpp @@ -21,14 +21,13 @@ static const FX_WCHAR g_FX_Currency[] = L"$z,zzz,zzz,zzz,zzz,zz9.99"; static const FX_WCHAR g_FX_Decimal[] = L"z,zzz,zzz,zzz,zzz,zz9.zzz"; static const FX_WCHAR g_FX_Integer[] = L"z,zzz,zzz,zzz,zzz,zzz"; -CXFA_XMLLocale::CXFA_XMLLocale(CXML_Element* pLocaleData) { - m_pLocaleData = pLocaleData; -} +CXFA_XMLLocale::CXFA_XMLLocale(CXML_Element* pLocaleData) + : m_pLocaleData(pLocaleData) {} + CXFA_XMLLocale::~CXFA_XMLLocale() { - if (m_pLocaleData) { - delete m_pLocaleData; - } + delete m_pLocaleData; } + void CXFA_XMLLocale::Release() { delete this; } |