Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2092)

Unified Diff: xfa/fwl/theme/cfwl_pushbuttontp.cpp

Issue 1925363002: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/theme/cfwl_formtp.cpp ('k') | xfa/fwl/theme/cfwl_scrollbartp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_pushbuttontp.cpp
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index 5662ac09c29921c6bb7d6daf44f0de6dc2bc896a..780c5803695dd0ccd1c739689e1d6e68f0f27f6a 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;
}
« no previous file with comments | « xfa/fwl/theme/cfwl_formtp.cpp ('k') | xfa/fwl/theme/cfwl_scrollbartp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698