summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_scrollbartp.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_scrollbartp.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_scrollbartp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_scrollbartp.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 11326edf59..0913a8daa2 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -15,16 +15,14 @@
#define FWL_SCROLL_PawLen 12.5f
-CFWL_ScrollBarTP::CFWL_ScrollBarTP() {
- m_pThemeData = new SBThemeData;
+CFWL_ScrollBarTP::CFWL_ScrollBarTP() : m_pThemeData(new SBThemeData) {
SetThemeData(0);
}
+
CFWL_ScrollBarTP::~CFWL_ScrollBarTP() {
- if (m_pThemeData) {
- delete m_pThemeData;
- m_pThemeData = NULL;
- }
+ delete m_pThemeData;
}
+
FX_BOOL CFWL_ScrollBarTP::IsValidWidget(IFWL_Widget* pWidget) {
if (!pWidget)
return FALSE;