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

Unified Diff: xfa/fwl/core/fwl_formimp.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/basewidget/fxmath_barcodeimp.cpp ('k') | xfa/fwl/core/fwl_noteimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/fwl_formimp.cpp
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp
index 815aca974c6c499593145c338f0dee1b60ba456a..2fd85a8d0eb7d74fcc11dd9af1edea935df5dea2 100644
--- a/xfa/fwl/core/fwl_formimp.cpp
+++ b/xfa/fwl/core/fwl_formimp.cpp
@@ -471,25 +471,19 @@ void CFWL_FormImp::ShowChildWidget(IFWL_Widget* pParent) {
pChild = pWidgetMgr->GetWidget(pChild, FWL_WGTRELATION_NextSibling);
}
}
+
void CFWL_FormImp::RemoveSysButtons() {
m_rtCaption.Reset();
- if (m_pCloseBox) {
- delete m_pCloseBox;
- m_pCloseBox = NULL;
- }
- if (m_pMinBox) {
- delete m_pMinBox;
- m_pMinBox = NULL;
- }
- if (m_pMaxBox) {
- delete m_pMaxBox;
- m_pMaxBox = NULL;
- }
- if (m_pCaptionBox) {
- delete m_pCaptionBox;
- m_pCaptionBox = NULL;
- }
+ delete m_pCloseBox;
+ m_pCloseBox = nullptr;
+ delete m_pMinBox;
+ m_pMinBox = nullptr;
+ delete m_pMaxBox;
+ m_pMaxBox = nullptr;
+ delete m_pCaptionBox;
+ m_pCaptionBox = nullptr;
}
+
void CFWL_FormImp::CalcContentRect(CFX_RectF& rtContent) {
#ifdef FWL_UseMacSystemBorder
rtContent = m_rtRelative;
« no previous file with comments | « xfa/fwl/basewidget/fxmath_barcodeimp.cpp ('k') | xfa/fwl/core/fwl_noteimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698