[Libreoffice-commits] core.git: cui/source

Michael Meeks michael.meeks at collabora.com
Wed May 6 03:49:32 PDT 2015


 cui/source/dialogs/cuihyperdlg.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 952220b750a5bc8a9d9df03e109ed1d84c393842
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed May 6 11:54:24 2015 +0100

    tdf#91014 - dispose SfxControllerItem sub-class earlier.
    
    This avoids getting StateChange calls on disposed widgets.
    
    Change-Id: I33968f1afc09df47eda5ad5e0f0ae3a5cc408a63

diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 1270e09..6c3c549 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -36,8 +36,8 @@ using ::com::sun::star::frame::XFrame;
 
 
 SvxHlinkCtrl::SvxHlinkCtrl( sal_uInt16 _nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg )
-: SfxControllerItem ( _nId, rBindings )
-  ,aRdOnlyForwarder  ( SID_READONLY_MODE, *this )
+    : SfxControllerItem ( _nId, rBindings )
+    , aRdOnlyForwarder  ( SID_READONLY_MODE, *this )
 {
     pParent = pDlg;
 }
@@ -45,7 +45,7 @@ SvxHlinkCtrl::SvxHlinkCtrl( sal_uInt16 _nId, SfxBindings & rBindings, SvxHpLinkD
 void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
                                  const SfxPoolItem* pState )
 {
-    if ( eState == SfxItemState::DEFAULT )
+    if ( eState == SfxItemState::DEFAULT && !pParent->IsDisposed() )
     {
         switch ( nSID )
         {
@@ -169,6 +169,8 @@ void SvxHpLinkDlg::dispose()
     delete mpItemSet;
     mpItemSet = NULL;
 
+    maCtrl.dispose();
+
     IconChoiceDialog::dispose();
 }
 


More information about the Libreoffice-commits mailing list