diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-19 14:51:10 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-19 14:51:10 -0700 |
commit | cfac954abcab7caf47d3fa3d641c553cba998271 (patch) | |
tree | 4cd546a2377e973fec54b75c1002c8c0ff321e8f /fpdfsdk/src/formfiller | |
parent | df558514bf5cb5750d5a7000a843f45f4170d5a4 (diff) | |
download | pdfium-cfac954abcab7caf47d3fa3d641c553cba998271.tar.xz |
Cleanup: Do not check pointers before deleting them.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1192743004.
Diffstat (limited to 'fpdfsdk/src/formfiller')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_IFormFiller.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp index 9969c18b63..464ff3ce6b 100644 --- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp +++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp @@ -704,14 +704,11 @@ void CFFL_IFormFiller::RemoveFormFiller(CPDFSDK_Annot* pAnnot) void CFFL_IFormFiller::UnRegisterFormFiller(CPDFSDK_Annot* pAnnot) { - CFFL_FormFiller * pFormFiller = NULL; - - if (m_Maps.Lookup(pAnnot,pFormFiller)) - { - if (pFormFiller) - delete pFormFiller; - m_Maps.RemoveKey(pAnnot); - } + CFFL_FormFiller* pFormFiller = nullptr; + if (m_Maps.Lookup(pAnnot,pFormFiller)) { + delete pFormFiller; + m_Maps.RemoveKey(pAnnot); + } } void CFFL_IFormFiller::SetFocusAnnotTab(CPDFSDK_Annot* pWidget, FX_BOOL bSameField, FX_BOOL bNext) |