Kaydet (Commit) 4f456874 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1439597 Dereference before null check

Change-Id: I0e4f8467440662a3d8cbda642339a55cfad445d8
Reviewed-on: https://gerrit.libreoffice.org/60849
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 80b287ad
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment