diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-08 09:30:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-08 11:47:17 +0200 |
commit | 94b9827f790ea1d37c2e128df1e3dc4b57c5f768 (patch) | |
tree | 7cd48708f35e6639cad45b3a2aca5f52c2a12b08 /reportdesign | |
parent | b06bd8a4f837ea30d6410190c701f5b27ad9d04c (diff) |
tdf#150756 Assertion when opening report for editing
regression from
commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu May 27 10:27:46 2021 +0200
ref-count SdrObject
Change-Id: Icfdf74035658a6d8222059bb6db36c852a51c4de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139632
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/sdr/RptModel.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx index 90553afec835..f79c2a214fca 100644 --- a/reportdesign/source/core/sdr/RptModel.cxx +++ b/reportdesign/source/core/sdr/RptModel.cxx @@ -54,6 +54,13 @@ OReportModel::OReportModel(::reportdesign::OReportDefinition* _pReportDefinition OReportModel::~OReportModel() { + // There are some nasty interactions which mean that we have to delete + // the pages before we destroy the model - otherwise we will trigger + // callbacks which will attempt to recreate SvxShape objects and + // fail because the model is being torn down. + while (GetPageCount()) + RemovePage(GetPageCount()-1); + detachController(); } |