Skip to content

Commit

Permalink
Resolves: tdf#95021 crash on closing macro dialog editor
Browse files Browse the repository at this point in the history
VclPtr related, dialog dtor is never called, so timer
is never stopped and timer refers to deleted parent
data

Change-Id: I804ba082817802c0017e61c6b86c5d3694995ea8
  • Loading branch information
Caolán McNamara committed Nov 12, 2015
1 parent 0d33c28 commit 0943adb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions basctl/source/basicide/baside3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down
3 changes: 2 additions & 1 deletion basctl/source/inc/baside3.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0943adb

Please sign in to comment.