summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-23 11:35:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-23 16:09:08 +0200
commit4fc4b3360de37d48cebaa7b7498ce544aeadc2d8 (patch)
tree09822a84b885f419631d41ff7e6328dfc156650b /sw
parentec451bcb2831439faac9fdfb2dc981b0fa0a2961 (diff)
Resolves: tdf#113336 avoid crash during teardown
Change-Id: Icdebd5aca1a2bdaefb904d153ca97a6cc56ac7ff Reviewed-on: https://gerrit.libreoffice.org/43712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/fly.cxx10
1 files changed, 7 insertions, 3 deletions
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 )
{