crashtesting: crash seen on exit of chart

with soffice --headless --convert-to ods forum-mso-en4-569016.xlsx

and other similar

Change-Id: I908fa834c1072a9854055cad1ee6261800d76aea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157573
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2023-10-04 20:32:17 +01:00
parent dd1e392dfd
commit 5c52884611
3 changed files with 11 additions and 2 deletions

View File

@@ -101,8 +101,11 @@ DrawModelWrapper::DrawModelWrapper()
DrawModelWrapper::~DrawModelWrapper() DrawModelWrapper::~DrawModelWrapper()
{ {
// normally call from ~SdrModel, but do it here explicitly before we clear m_xChartItemPool
implDtorClearModel();
//remove m_pChartItemPool from pool chain //remove m_pChartItemPool from pool chain
if(m_xChartItemPool) if (m_xChartItemPool)
{ {
SfxItemPool* pPool = &GetItemPool(); SfxItemPool* pPool = &GetItemPool();
for (;;) for (;;)

View File

@@ -252,6 +252,7 @@ public:
tools::Long nLower = 0); tools::Long nLower = 0);
protected: protected:
void implDtorClearModel();
virtual css::uno::Reference< css::uno::XInterface > createUnoModel(); virtual css::uno::Reference< css::uno::XInterface > createUnoModel();
private: private:

View File

@@ -200,7 +200,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, comphelper::IEmbeddedHelper* pEmbeddedHel
mpImpl->initTheme(); mpImpl->initTheme();
} }
SdrModel::~SdrModel() void SdrModel::implDtorClearModel()
{ {
mbInDestruction = true; mbInDestruction = true;
@@ -216,6 +216,11 @@ SdrModel::~SdrModel()
m_pCurrentUndoGroup.reset(); m_pCurrentUndoGroup.reset();
ClearModel(true); ClearModel(true);
}
SdrModel::~SdrModel()
{
implDtorClearModel();
#ifdef DBG_UTIL #ifdef DBG_UTIL
// SdrObjectLifetimeWatchDog: // SdrObjectLifetimeWatchDog: