diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-11-12 17:29:47 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-11-12 17:33:20 +0000 |
commit | 51af0ef35b5a7ed0d1468f11cca73ba0158e8be4 (patch) | |
tree | 78966feccd2062d60f298aba49966e21b84d217e /svx/source | |
parent | 43f38e717bcafb899d9ab1cfc9c277a6bfb87bee (diff) |
tdf#95551 - fix image map crash.
Remove listener we add, and don't crash on callback for disposed dialog.
Change-Id: Ia6a1bddd212cb28a0331469e8e87324346d02841
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/imapdlg.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 34b1dbd7d424..2df979a56caa 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -182,7 +182,7 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window m_pEdtText->SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) ); m_pCbbTarget->SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) ); - SvtMiscOptions aMiscOptions; + SvtMiscOptions aMiscOptions; aMiscOptions.AddListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) ); m_pTbxIMapDlg1->SetSelectHdl( LINK( this, SvxIMapDlg, TbxClickHdl ) ); @@ -220,6 +220,9 @@ void SvxIMapDlg::dispose() { pIMapWnd->SetUpdateLink( Link<GraphCtrl*,void>() ); + SvtMiscOptions aMiscOptions; + aMiscOptions.RemoveListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) ); + // Delete URL-List pIMapWnd.disposeAndClear(); DELETEZ( pOwnData ); @@ -805,8 +808,11 @@ IMPL_LINK_TYPED( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void ) IMPL_LINK_NOARG_TYPED(SvxIMapDlg, MiscHdl, LinkParamNone*, void) { - SvtMiscOptions aMiscOptions; - m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() ); + if (m_pTbxIMapDlg1) + { + SvtMiscOptions aMiscOptions; + m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() ); + } } SvxIMapDlg* GetIMapDlg() |