tdf#95551 - fix image map crash.

Remove listener we add, and don't crash on callback for disposed dialog.

Change-Id: Ia6a1bddd212cb28a0331469e8e87324346d02841
This commit is contained in:
Michael Meeks
2015-11-12 17:29:47 +00:00
parent 43f38e717b
commit 51af0ef35b

View File

@@ -220,6 +220,9 @@ void SvxIMapDlg::dispose()
{ {
pIMapWnd->SetUpdateLink( Link<GraphCtrl*,void>() ); pIMapWnd->SetUpdateLink( Link<GraphCtrl*,void>() );
SvtMiscOptions aMiscOptions;
aMiscOptions.RemoveListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) );
// Delete URL-List // Delete URL-List
pIMapWnd.disposeAndClear(); pIMapWnd.disposeAndClear();
DELETEZ( pOwnData ); DELETEZ( pOwnData );
@@ -804,10 +807,13 @@ IMPL_LINK_TYPED( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void )
} }
IMPL_LINK_NOARG_TYPED(SvxIMapDlg, MiscHdl, LinkParamNone*, void) IMPL_LINK_NOARG_TYPED(SvxIMapDlg, MiscHdl, LinkParamNone*, void)
{
if (m_pTbxIMapDlg1)
{ {
SvtMiscOptions aMiscOptions; SvtMiscOptions aMiscOptions;
m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() ); m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
} }
}
SvxIMapDlg* GetIMapDlg() SvxIMapDlg* GetIMapDlg()
{ {