Kaydet (Commit) 25aa4d4b authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Andras Timar

tdf#95551 - fix image map crash.

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

Reviewed-on: https://gerrit.libreoffice.org/19936Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
(cherry picked from commit 45c6d948)

Conflicts:
	svx/source/dialog/imapdlg.cxx

Change-Id: Ia6a1bddd212cb28a0331469e8e87324346d02841
üst 80b68236
...@@ -184,7 +184,7 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window ...@@ -184,7 +184,7 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window
m_pEdtText->SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) ); m_pEdtText->SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
m_pCbbTarget->SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) ); m_pCbbTarget->SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) );
SvtMiscOptions aMiscOptions; SvtMiscOptions aMiscOptions;
aMiscOptions.AddListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) ); aMiscOptions.AddListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) );
m_pTbxIMapDlg1->SetSelectHdl( LINK( this, SvxIMapDlg, TbxClickHdl ) ); m_pTbxIMapDlg1->SetSelectHdl( LINK( this, SvxIMapDlg, TbxClickHdl ) );
...@@ -222,6 +222,9 @@ void SvxIMapDlg::dispose() ...@@ -222,6 +222,9 @@ void SvxIMapDlg::dispose()
{ {
pIMapWnd->SetUpdateLink( Link<>() ); pIMapWnd->SetUpdateLink( Link<>() );
SvtMiscOptions aMiscOptions;
aMiscOptions.RemoveListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) );
// Delete URL-List // Delete URL-List
pIMapWnd.disposeAndClear(); pIMapWnd.disposeAndClear();
DELETEZ( pOwnData ); DELETEZ( pOwnData );
...@@ -814,9 +817,11 @@ IMPL_LINK( SvxIMapDlg, StateHdl, IMapWindow*, pWnd ) ...@@ -814,9 +817,11 @@ IMPL_LINK( SvxIMapDlg, StateHdl, IMapWindow*, pWnd )
IMPL_LINK_NOARG(SvxIMapDlg, MiscHdl) IMPL_LINK_NOARG(SvxIMapDlg, MiscHdl)
{ {
SvtMiscOptions aMiscOptions; if (m_pTbxIMapDlg1)
m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() ); {
SvtMiscOptions aMiscOptions;
m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
}
return 0L; return 0L;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment