diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-12 12:25:16 +0000 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2015-11-12 21:32:31 +0000 |
commit | 33df62efe3c94b87b765f8334c8b614eb896338b (patch) | |
tree | d13e434c718a44a28a67a3b1c5e5727f7a692496 | |
parent | 0ff2015b429f7b5847f8b2eaab498416ef043642 (diff) |
Resolves: tdf#95021 crash on closing macro dialog editor
VclPtr related, dialog dtor is never called, so timer
is never stopped and timer refers to deleted parent
data
(cherry picked from commit 0943adb2f7ec319891c11889b40c9a69f0d1027e)
Change-Id: I804ba082817802c0017e61c6b86c5d3694995ea8
Reviewed-on: https://gerrit.libreoffice.org/19926
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 6 | ||||
-rw-r--r-- | basctl/source/inc/baside3.hxx | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 19c052d928b4..9ebb90ed280b 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -98,6 +98,12 @@ DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rD SetReadOnly(true); } +void DialogWindow::dispose() +{ + pEditor.reset(); + BaseWindow::dispose(); +} + void DialogWindow::LoseFocus() { if ( IsModified() ) diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 94cd40ed38b9..49358a97a2fc 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -56,13 +56,14 @@ class DialogWindow: public BaseWindow { private: DialogWindowLayout& rLayout; - boost::scoped_ptr<DlgEditor> pEditor; // never nullptr + boost::scoped_ptr<DlgEditor> pEditor; boost::scoped_ptr<SfxUndoManager> pUndoMgr; // never nullptr OUString aCurPath; protected: virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; + virtual void dispose() SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; |