[Libreoffice-commits] core.git: svx/source
Michael Meeks
michael.meeks at collabora.com
Thu Nov 12 09:23:51 PST 2015
svx/source/dialog/imapdlg.cxx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 51af0ef35b5a7ed0d1468f11cca73ba0158e8be4
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Nov 12 17:29:47 2015 +0000
tdf#95551 - fix image map crash.
Remove listener we add, and don't crash on callback for disposed dialog.
Change-Id: Ia6a1bddd212cb28a0331469e8e87324346d02841
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 34b1dbd..2df979a 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()
More information about the Libreoffice-commits
mailing list