From 9de0d5c43eefd1b4a7224a649c96f1b2b296b88f Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 11 Oct 2012 21:35:18 -0400 Subject: Fix another crash on exit. Change-Id: If0f26e2e81e7f22c63b5eaba1e51bf10a7d3b603 --- svtools/source/contnr/treelistbox.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'svtools') diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 13ae15ded112..42d926f74a21 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1651,6 +1651,12 @@ void SvTreeListBox::InitTreeView() SvTreeListBox::~SvTreeListBox() { DBG_DTOR(SvTreeListBox,0); + + pImp->CallEventListeners( VCLEVENT_OBJECT_DYING ); + delete pImp; + delete pLBoxImpl->m_pLink; + ClearTabList(); + delete pEdCtrl; pEdCtrl = 0; pModel->RemoveView( this ); @@ -1668,11 +1674,6 @@ SvTreeListBox::~SvTreeListBox() if( this == pDDTarget ) pDDTarget = 0; delete pLBoxImpl; - - pImp->CallEventListeners( VCLEVENT_OBJECT_DYING ); - delete pImp; - delete pLBoxImpl->m_pLink; - ClearTabList(); } void SvTreeListBox::SetExtendedWinBits( ExtendedWinBits _nBits ) -- cgit