[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - svx/source
Michael Meeks
michael.meeks at collabora.com
Fri Nov 13 07:25:20 PST 2015
svx/source/dialog/imapdlg.cxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 45c6d948fbac77a8a6926f56579a4ceba981288f
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Nov 12 17:38:25 2015 +0000
tdf#95551 - fix image map crash.
Remove listener we add, and don't crash on callback for disposed dialog.
Change-Id: Ia6a1bddd212cb28a0331469e8e87324346d02841
Reviewed-on: https://gerrit.libreoffice.org/19936
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 772f970..f51829b 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -184,7 +184,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 @@ SvxIMapDlg::~SvxIMapDlg()
void SvxIMapDlg::dispose()
{
+ SvtMiscOptions aMiscOptions;
+ aMiscOptions.RemoveListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) );
+
// Delete URL-List
pIMapWnd.disposeAndClear();
DELETEZ( pOwnData );
@@ -776,9 +779,11 @@ IMPL_LINK( SvxIMapDlg, StateHdl, IMapWindow*, pWnd )
IMPL_LINK_NOARG(SvxIMapDlg, MiscHdl)
{
- SvtMiscOptions aMiscOptions;
- m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
-
+ if (m_pTbxIMapDlg1)
+ {
+ SvtMiscOptions aMiscOptions;
+ m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
+ }
return 0L;
}
More information about the Libreoffice-commits
mailing list