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
This commit is contained in:
@@ -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;
|
||||
|
@@ -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 );
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user