summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_pushbuttontp.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/fwl/theme/cfwl_pushbuttontp.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/fwl/theme/cfwl_pushbuttontp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_pushbuttontp.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index 5662ac09c2..780c580369 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -15,15 +15,14 @@
#define PUSHBUTTON_SIZE_Corner 2
-CFWL_PushButtonTP::CFWL_PushButtonTP() {
- m_pThemeData = new PBThemeData;
+CFWL_PushButtonTP::CFWL_PushButtonTP() : m_pThemeData(new PBThemeData) {
SetThemeData(0);
}
+
CFWL_PushButtonTP::~CFWL_PushButtonTP() {
- if (m_pThemeData) {
- delete m_pThemeData;
- }
+ delete m_pThemeData;
}
+
FX_BOOL CFWL_PushButtonTP::IsValidWidget(IFWL_Widget* pWidget) {
return pWidget->GetClassID() == FWL_CLASSHASH_PushButton;
}