summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-23 11:35:38 +0100
committerMichael Stahl <mstahl@redhat.com>2017-10-23 16:51:50 +0200
commit3cd91be80f82f983f414018e4e57b6d3b570064e (patch)
tree124d9024e79649dc464f6e1e82e91eadb8ad3730
parent000fbca705166237645bccf0b1c28164b076c043 (diff)
Resolves: tdf#113336 avoid crash during teardown
Change-Id: Icdebd5aca1a2bdaefb904d153ca97a6cc56ac7ff Reviewed-on: https://gerrit.libreoffice.org/43719 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
-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 df8f3a6f84fe..aaa74c72ba0f 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 )
{