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

Caolán McNamara caolanm at redhat.com
Mon Oct 23 14:09:30 UTC 2017


 sw/source/core/layout/fly.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 4fc4b3360de37d48cebaa7b7498ce544aeadc2d8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 23 11:35:38 2017 +0100

    Resolves: tdf#113336 avoid crash during teardown
    
    Change-Id: Icdebd5aca1a2bdaefb904d153ca97a6cc56ac7ff
    Reviewed-on: https://gerrit.libreoffice.org/43712
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 5070eac93604..060285bf6963 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1742,9 +1742,13 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
                 {
                     m_bFormatHeightOnly = true;
                 }
-                static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( true );
-                static_cast<SwFlyFreeFrame*>(this)->SwFlyFreeFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut());
-                static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( false );
+                SwViewShell* pSh = getRootFrame()->GetCurrShell();
+                if (pSh)
+                {
+                    static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( true );
+                    static_cast<SwFlyFreeFrame*>(this)->SwFlyFreeFrame::MakeAll(pSh->GetOut());
+                    static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( false );
+                }
                 // #i55416#
                 if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
                 {


More information about the Libreoffice-commits mailing list