summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-15 08:03:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-15 08:03:04 +0200
commitb4b71d20e33b82d377e287f0e5cf07b7e6182e78 (patch)
tree6a0865a60172a126a96d7cee40336be6c38a5084
parent46564fd97308ce070248482ad65a311a329a2b76 (diff)
loplugin:vclwidgets
Change-Id: Ib64f7585bf44bdaa6dd1101b97848baa1f121725
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx3
-rw-r--r--sw/source/uibase/inc/FrameControl.hxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 427faafe85b2..665e815f44b4 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4975,7 +4975,6 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
SwEditWin::~SwEditWin()
{
disposeOnce();
- delete m_pFrameControlsManager;
}
void SwEditWin::dispose()
@@ -5003,6 +5002,8 @@ void SwEditWin::dispose()
m_pAnchorMarker = NULL;
m_pFrameControlsManager->dispose();
+ delete m_pFrameControlsManager;
+ m_pFrameControlsManager = nullptr;
vcl::Window::dispose();
}
diff --git a/sw/source/uibase/inc/FrameControl.hxx b/sw/source/uibase/inc/FrameControl.hxx
index 5787b230574d..653c6e127862 100644
--- a/sw/source/uibase/inc/FrameControl.hxx
+++ b/sw/source/uibase/inc/FrameControl.hxx
@@ -56,7 +56,7 @@ class SwFrameMenuButtonBase : public MenuButton, public ISwFrameControl
const SwFrm* m_pFrm;
protected:
- virtual ~SwFrameMenuButtonBase() {}
+ virtual ~SwFrameMenuButtonBase() { disposeOnce(); }
virtual void dispose() SAL_OVERRIDE;
public: