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>
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 3b48417..70db09b 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 b531bd7..1c14430 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();
    }
}