[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun May 12 20:41:59 UTC 2019
sw/source/core/text/frmform.cxx | 10 ++++++----
sw/source/core/text/txtfrm.cxx | 3 +--
2 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit c5338e3ad116dbde0aed801f459173231716efa3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun May 12 18:27:27 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun May 12 22:40:42 2019 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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();
}
}
More information about the Libreoffice-commits
mailing list