sw/source/core/fields/reffld.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
New commits: commit dab606b93fee4a3aac895e4f3b4a5bc375140885 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Jun 17 16:35:52 2018 +0100 crashtesting: export of ooo24533-1.sxw to docx a problem (I assume) since... commit d7d5fa52b03fe058759f90f489a5071a39883ed7 Date: Tue May 22 10:49:36 2018 +0200 sw_redlinehide: trivial conversions in reffld.cxx Change-Id: I4a9ec367e8a280cb56c3e0e47558da959fc14b38 Reviewed-on: https://gerrit.libreoffice.org/55956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 63974c017a95..97ac139d53cf 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -97,6 +97,9 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos, const SwTextFrame *pMyFrame = static_cast<SwTextFrame*>(rMyNd.getLayoutFrame( rMyNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ), *pFrame = static_cast<SwTextFrame*>(rBehindNd.getLayoutFrame( rBehindNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ); + if( !pFrame || !pMyFrame) + return false; + TextFrameIndex const nMySttPosIndex(pMyFrame->MapModelToView(&rMyNd, nMySttPos)); TextFrameIndex const nSttPosIndex(pFrame->MapModelToView(&rBehindNd, nSttPos)); while (pFrame && !pFrame->IsInside(nSttPosIndex)) @@ -567,9 +570,12 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr ) { const SwTextFrame* pFrame = static_cast<SwTextFrame*>(pTextNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false)), *pSave = pFrame; - TextFrameIndex const nNumStartIndex(pFrame->MapModelToView(pTextNd, nNumStart)); - while (pFrame && !pFrame->IsInside(nNumStartIndex)) - pFrame = pFrame->GetFollow(); + if (pFrame) + { + TextFrameIndex const nNumStartIndex(pFrame->MapModelToView(pTextNd, nNumStart)); + while (pFrame && !pFrame->IsInside(nNumStartIndex)) + pFrame = pFrame->GetFollow(); + } if( pFrame || nullptr != ( pFrame = pSave )) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits