sw/source/filter/ww8/ww8atr.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 4f45687426af9b6d18b590816eb902bb364a521b Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Sep 21 09:00:35 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Sep 21 22:05:58 2018 +0200 coverity#1439597 Dereference before null check Change-Id: I0e4f8467440662a3d8cbda642339a55cfad445d8 Reviewed-on: https://gerrit.libreoffice.org/60849 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 8da786e78ccc..c331ab261f9d 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -5507,8 +5507,11 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTex if ( pRedl->GetRedlineData().GetType() != aRedlineType ) continue; - const SwPosition* pCheckedStt = pRedl->Start(); const SwPosition* pCheckedEnd = pRedl->End(); + if (!pCheckedEnd) + continue; + + const SwPosition* pCheckedStt = pRedl->Start(); sal_uLong uStartNodeIndex = pCheckedStt->nNode.GetIndex(); sal_uLong uStartCharIndex = pCheckedStt->nContent.GetIndex(); sal_uLong uEndNodeIndex = pCheckedEnd->nNode.GetIndex(); @@ -5517,9 +5520,6 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTex if( uStartNodeIndex <= uNodeIndex && uNodeIndex < uEndNodeIndex ) { - if ( !pCheckedEnd ) - continue; - // Maybe add here a check that also the start & end of the redline is the entire paragraph if ( ( uStartNodeIndex < uEndNodeIndex ) && // check start: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits