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

Unified Diff: xfa/fwl/theme/cfwl_scrollbartp.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_pushbuttontp.cpp ('k') | xfa/fwl/theme/cfwl_widgettp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_scrollbartp.cpp
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 11326edf5923fc655121a49fc7ff96c326630ce4..0913a8daa27299d92de86b5ec9d2fe4390431445 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;
« no previous file with comments | « xfa/fwl/theme/cfwl_pushbuttontp.cpp ('k') | xfa/fwl/theme/cfwl_widgettp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698