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

Unified Diff: xfa/fwl/core/fwl_noteimp.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/core/fwl_formimp.cpp ('k') | xfa/fwl/core/fwl_widgetmgrimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/fwl_noteimp.cpp
diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp
index 267b2ca2ee8f642987887247db8389f93bd84083..39afa783c0326420409f982e286c8f47a36dfb45 100644
--- a/xfa/fwl/core/fwl_noteimp.cpp
+++ b/xfa/fwl/core/fwl_noteimp.cpp
@@ -870,20 +870,20 @@ CFWL_ToolTipContainer::~CFWL_ToolTipContainer() {
}
delete m_ToolTipDp;
}
+
// static
CFWL_ToolTipContainer* CFWL_ToolTipContainer::getInstance() {
- if (!s_pInstance) {
+ if (!s_pInstance)
s_pInstance = new CFWL_ToolTipContainer;
- }
return s_pInstance;
}
+
// static
void CFWL_ToolTipContainer::DeleteInstance() {
- if (s_pInstance) {
- delete s_pInstance;
- s_pInstance = NULL;
- }
+ delete s_pInstance;
+ s_pInstance = NULL;
}
+
FX_ERR CFWL_ToolTipContainer::AddToolTipTarget(IFWL_ToolTipTarget* pTarget) {
if (m_arrWidget.Find(pTarget) < 0) {
m_arrWidget.Add(pTarget);
« no previous file with comments | « xfa/fwl/core/fwl_formimp.cpp ('k') | xfa/fwl/core/fwl_widgetmgrimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698