diff options
author | thestig <thestig@chromium.org> | 2016-04-28 17:29:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-28 17:29:19 -0700 |
commit | 495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch) | |
tree | 42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fwl/core/fwl_noteimp.cpp | |
parent | a31098417852bdf13e693a6e0913e0706cf94098 (diff) | |
download | pdfium-495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc.tar.xz |
Do not check pointers before deleting them.
XFA edition.
Review-Url: https://codereview.chromium.org/1925363002
Diffstat (limited to 'xfa/fwl/core/fwl_noteimp.cpp')
-rw-r--r-- | xfa/fwl/core/fwl_noteimp.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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); |