summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-10-01 17:18:44 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-10-02 08:45:16 +0200
commit81f713802ea6d1def41a29a83d7122e8bb0e4dde (patch)
treeef23e68243d3542b9c620ef215d8cf63de5b048f /sw/source
parentff2c158adcbcad5a35c11fd46a95e37136936797 (diff)
sw: Don't assert when printing with comments in margins
Assertions in SwTextFrame::DestoryImpl that were added in ee6eb7abf5803d8e0d929380920a6591ba9af486 are triggered when reproducing tdf#118690. I've never liked these IsInDtor checks, so avoid the situation by delaying the destruction of the temporary SwDoc. Change-Id: I601da8b45e547f4903b7ff3b0c6461a01964f416 Reviewed-on: https://gerrit.libreoffice.org/60940 Tested-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/view/printdata.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index da1810546fb5..adfe22ab47c6 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -66,7 +66,10 @@ void SwRenderData::DeletePostItData()
{
// printer needs to remain at the real document
m_pPostItShell->GetDoc()->getIDocumentDeviceAccess().setPrinter( nullptr, false, false );
- m_pPostItShell.reset();
+ { // avoid destroying layout from SwDoc dtor
+ rtl::Reference<SwDoc> const pDoc(m_pPostItShell->GetDoc());
+ m_pPostItShell.reset();
+ }
m_pPostItFields.reset();
}
}