diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-12 12:25:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-12 12:27:10 +0000 |
commit | 0943adb2f7ec319891c11889b40c9a69f0d1027e (patch) | |
tree | 37c62c29f28de8417acc986e70209cdcadaff55a /basctl | |
parent | 0d33c2884f7b02e9e754d2754a45ab29ad63ddf6 (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
Change-Id: I804ba082817802c0017e61c6b86c5d3694995ea8
Diffstat (limited to 'basctl')
-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 6b1edfbfc524..09e3c873dcd3 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -97,6 +97,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 ebafb496eb1d..3ac12e1e3d8e 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -57,13 +57,14 @@ class DialogWindow: public BaseWindow { private: DialogWindowLayout& rLayout; - std::unique_ptr<DlgEditor> pEditor; // never nullptr + std::unique_ptr<DlgEditor> pEditor; std::unique_ptr<SfxUndoManager> pUndoMgr; // never nullptr OUString aCurPath; protected: virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; virtual void Resize() override; + virtual void dispose() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; |