diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-30 20:16:12 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-30 20:20:20 -0500 |
commit | 4ca5536f008d1503a9c9fa8b65150baeb92e4b4c (patch) | |
tree | cac2bcc85ce83fc3c1e9a80f4f46c516322012e1 /cui/source | |
parent | bab7eebba127d603a9f8011fed290627e2a64423 (diff) |
fdo#74252: Fix crash on exit with the customize dialog.
pEventLB gets accessed after it's been deleted. Moving the code that
accesses it to before it gets deleted fixes the crash.
Change-Id: If559fe3ea7dd76a3394d0aa7c18c9329188aa17f
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/customize/eventdlg.cxx | 12 | ||||
-rw-r--r-- | cui/source/customize/macropg.cxx | 10 |
2 files changed, 12 insertions, 10 deletions
diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 02888d3f505d..dd61fc2e7884 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -39,6 +39,7 @@ #include <sfx2/docfac.hxx> #include <sfx2/fcontnr.hxx> #include <unotools/eventcfg.hxx> +#include <svtools/treelistentry.hxx> #include "headertablistbox.hxx" #include "macropg_impl.hxx" @@ -108,7 +109,18 @@ void SvxEventConfigPage::LateInit( const uno::Reference< frame::XFrame >& _rxFra SvxEventConfigPage::~SvxEventConfigPage() { + // need to delete the user data + SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); + SvTreeListEntry* pE = rListBox.GetEntry( 0 ); + while( pE ) + { + OUString* pEventName = (OUString*)pE->GetUserData(); + delete pEventName; + pE->SetUserData((void*)0); + pE = rListBox.NextSibling( pE ); + } delete mpImpl->pEventLB; + delete mpImpl->pAssignFT; delete mpImpl->pAssignPB; delete mpImpl->pDeletePB; diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 99b962fd0db1..9f0fe1d93d0f 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -250,16 +250,6 @@ _SvxMacroTabPage::_SvxMacroTabPage(Window* pParent, const OString& rID, _SvxMacroTabPage::~_SvxMacroTabPage() { - // need to delete the user data - SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - SvTreeListEntry* pE = rListBox.GetEntry( 0 ); - while( pE ) - { - OUString* pEventName = (OUString*)pE->GetUserData(); - delete pEventName; - pE->SetUserData((void*)0); - pE = rListBox.NextSibling( pE ); - } DELETEZ( mpImpl ); } // ----------------------------------------------------------------------------- |