From 495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc Mon Sep 17 00:00:00 2001 From: thestig Date: Thu, 28 Apr 2016 17:29:19 -0700 Subject: Do not check pointers before deleting them. XFA edition. Review-Url: https://codereview.chromium.org/1925363002 --- xfa/fwl/core/fwl_noteimp.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xfa/fwl/core/fwl_noteimp.cpp') diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index 267b2ca2ee..39afa783c0 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); -- cgit v1.2.3