[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - basctl/source

Caolán McNamara caolanm at redhat.com
Thu Nov 12 13:32:54 PST 2015


 basctl/source/basicide/baside3.cxx |    6 ++++++
 basctl/source/inc/baside3.hxx      |    3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 33df62efe3c94b87b765f8334c8b614eb896338b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 12 12:25:16 2015 +0000

    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 at gmail.com>
    Tested-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 19c052d..9ebb90e 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 94cd40e..49358a9 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;


More information about the Libreoffice-commits mailing list