summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-07-16 18:45:22 -0700
committerLei Zhang <thestig@chromium.org>2015-07-16 18:45:22 -0700
commit796c908e7b7bdde819a1e5a4bfd3576d8e8859d6 (patch)
tree8c0cd763dd9bf70bc14da8f8cb7893835a3572fe /fpdfsdk/src/formfiller
parentba026913c273a5c1c841bced288fdab03f10ad08 (diff)
downloadpdfium-796c908e7b7bdde819a1e5a4bfd3576d8e8859d6.tar.xz
Merge to XFA: Cleanup: Do not check pointers before deleting them, part 2.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1195363002 . (cherry picked from commit 21bf242a31eff79f754c5e9c3b41c52e33483bb0) Review URL: https://codereview.chromium.org/1235753006 .
Diffstat (limited to 'fpdfsdk/src/formfiller')
-rw-r--r--fpdfsdk/src/formfiller/FFL_ComboBox.cpp6
-rw-r--r--fpdfsdk/src/formfiller/FFL_ListBox.cpp6
-rw-r--r--fpdfsdk/src/formfiller/FFL_TextField.cpp7
3 files changed, 3 insertions, 16 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index 4ceb1e9af3..b0c7b2d941 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -23,11 +23,7 @@ CFFL_ComboBox::CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot) :
CFFL_ComboBox::~CFFL_ComboBox()
{
- if (m_pFontMap)
- {
- delete m_pFontMap;
- m_pFontMap = NULL;
- }
+ delete m_pFontMap;
}
PWL_CREATEPARAM CFFL_ComboBox::GetCreateParam()
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
index 28dcf340ad..c105cfcbdd 100644
--- a/fpdfsdk/src/formfiller/FFL_ListBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
@@ -26,11 +26,7 @@ CFFL_ListBox::CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget) :
CFFL_ListBox::~CFFL_ListBox()
{
- if (m_pFontMap)
- {
- delete m_pFontMap;
- m_pFontMap = NULL;
- }
+ delete m_pFontMap;
}
PWL_CREATEPARAM CFFL_ListBox::GetCreateParam()
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index 83c7f35ba9..db69101ec2 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -19,12 +19,7 @@ CFFL_TextField::CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
CFFL_TextField::~CFFL_TextField()
{
- if (m_pFontMap)
- {
- delete m_pFontMap;
- m_pFontMap = NULL;
- }
-
+ delete m_pFontMap;
}
PWL_CREATEPARAM CFFL_TextField::GetCreateParam()