diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-12 18:27:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-12 22:40:42 +0200 |
commit | c5338e3ad116dbde0aed801f459173231716efa3 (patch) | |
tree | f2912fd7ae558a5f2b418690ee742c4e655dd249 | |
parent | b49e1e709b3fc4b9831fd0961e9310ebf1050429 (diff) |
crashtesting: frequent nulldef at end of SwTextFrame::ValidateFrame
maybe since...
commit 1caea03fcc6c24e38b2d1d9f6097ad84183ffefd
Date: Mon May 6 15:40:41 2019 +0200
tdf#122892 tdf#124366 sw: fix loop in SwTextFrame::CalcFollow()
though it happens in the idle callback and isn't easily reproducible
Change-Id: Iadcd735661ab42908061e80d72c8b32a0c075726
Reviewed-on: https://gerrit.libreoffice.org/72198
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/text/frmform.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 3b484176ab8e..70db09b052bb 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -108,10 +108,12 @@ void SwTextFrame::ValidateFrame() // We at least have to save the MustFit flag! OSL_ENSURE( HasPara(), "ResetPreps(), missing ParaPortion." ); - SwParaPortion *pPara = GetPara(); - const bool bMustFit = pPara->IsPrepMustFit(); - ResetPreps(); - pPara->SetPrepMustFit( bMustFit ); + if (SwParaPortion *pPara = GetPara()) + { + const bool bMustFit = pPara->IsPrepMustFit(); + ResetPreps(); + pPara->SetPrepMustFit( bMustFit ); + } } // After a RemoveFootnote the BodyFrame and all Frames contained within it, need to be diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index b531bd749742..1c1443042649 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1337,8 +1337,7 @@ void SwTextFrame::ResetPreps() { if ( GetCacheIdx() != USHRT_MAX ) { - SwParaPortion *pPara; - if( nullptr != (pPara = GetPara()) ) + if (SwParaPortion *pPara = GetPara()) pPara->ResetPreps(); } } |