diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-05-06 11:54:24 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-06 11:56:16 +0100 |
commit | 952220b750a5bc8a9d9df03e109ed1d84c393842 (patch) | |
tree | 4a806d36c557ec3d34f2a1f7ed9fe0dd82be3f9d /cui | |
parent | f630f9598f2e328cbe37aff5af0e93c027a94de5 (diff) |
tdf#91014 - dispose SfxControllerItem sub-class earlier.
This avoids getting StateChange calls on disposed widgets.
Change-Id: I33968f1afc09df47eda5ad5e0f0ae3a5cc408a63
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
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(); } |