From 952220b750a5bc8a9d9df03e109ed1d84c393842 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 6 May 2015 11:54:24 +0100 Subject: tdf#91014 - dispose SfxControllerItem sub-class earlier. This avoids getting StateChange calls on disposed widgets. Change-Id: I33968f1afc09df47eda5ad5e0f0ae3a5cc408a63 --- cui/source/dialogs/cuihyperdlg.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 1270e09f92d4..6c3c5498b667 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(); } -- cgit