[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 2 06:45:39 UTC 2018


 sw/source/core/view/printdata.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 81f713802ea6d1def41a29a83d7122e8bb0e4dde
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Oct 1 17:18:44 2018 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Oct 2 08:45:16 2018 +0200

    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 at fbihome.de>
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>

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();
     }
 }


More information about the Libreoffice-commits mailing list