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/fwl/core/fwl_formimp.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/fwl/core/fwl_formimp.cpp')
-rw-r--r-- | xfa/fwl/core/fwl_formimp.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp index 815aca974c..2fd85a8d0e 100644 --- a/xfa/fwl/core/fwl_formimp.cpp +++ b/xfa/fwl/core/fwl_formimp.cpp @@ -471,25 +471,19 @@ void CFWL_FormImp::ShowChildWidget(IFWL_Widget* pParent) { pChild = pWidgetMgr->GetWidget(pChild, FWL_WGTRELATION_NextSibling); } } + void CFWL_FormImp::RemoveSysButtons() { m_rtCaption.Reset(); - if (m_pCloseBox) { - delete m_pCloseBox; - m_pCloseBox = NULL; - } - if (m_pMinBox) { - delete m_pMinBox; - m_pMinBox = NULL; - } - if (m_pMaxBox) { - delete m_pMaxBox; - m_pMaxBox = NULL; - } - if (m_pCaptionBox) { - delete m_pCaptionBox; - m_pCaptionBox = NULL; - } + delete m_pCloseBox; + m_pCloseBox = nullptr; + delete m_pMinBox; + m_pMinBox = nullptr; + delete m_pMaxBox; + m_pMaxBox = nullptr; + delete m_pCaptionBox; + m_pCaptionBox = nullptr; } + void CFWL_FormImp::CalcContentRect(CFX_RectF& rtContent) { #ifdef FWL_UseMacSystemBorder rtContent = m_rtRelative; |