summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffpushbutton.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-28 17:29:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-28 17:29:19 -0700
commit495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch)
tree42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fxfa/app/xfa_ffpushbutton.cpp
parenta31098417852bdf13e693a6e0913e0706cf94098 (diff)
downloadpdfium-495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc.tar.xz
Do not check pointers before deleting them.
XFA edition. Review-Url: https://codereview.chromium.org/1925363002
Diffstat (limited to 'xfa/fxfa/app/xfa_ffpushbutton.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp
index 3893bc29fb..6db2b7078c 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp
@@ -86,25 +86,19 @@ void CXFA_FFPushButton::UpdateWidgetProperty() {
}
m_pNormalWidget->ModifyStylesEx(dwStyleEx, 0xFFFFFFFF);
}
+
void CXFA_FFPushButton::UnloadWidget() {
- if (m_pRolloverTextLayout) {
- delete m_pRolloverTextLayout;
- m_pRolloverTextLayout = NULL;
- }
- if (m_pDownTextLayout) {
- delete m_pDownTextLayout;
- m_pDownTextLayout = NULL;
- }
- if (m_pDownProvider) {
- delete m_pDownProvider;
- m_pDownProvider = NULL;
- }
- if (m_pRollProvider) {
- delete m_pRollProvider;
- m_pRollProvider = NULL;
- }
+ delete m_pRolloverTextLayout;
+ m_pRolloverTextLayout = nullptr;
+ delete m_pDownTextLayout;
+ m_pDownTextLayout = nullptr;
+ delete m_pDownProvider;
+ m_pDownProvider = nullptr;
+ delete m_pRollProvider;
+ m_pRollProvider = nullptr;
CXFA_FFField::UnloadWidget();
}
+
FX_BOOL CXFA_FFPushButton::PerformLayout() {
CXFA_FFWidget::PerformLayout();
CFX_RectF rtWidget;