Kaydet (Commit) 7ed40b18 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1436016 Dereference after null check

Change-Id: I5bd8719dcbd501b0f3a196d5aa605a50c0030c6e
Reviewed-on: https://gerrit.libreoffice.org/55605Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d4d03761
...@@ -958,13 +958,12 @@ bool SwCursorShell::TestCurrPam( ...@@ -958,13 +958,12 @@ bool SwCursorShell::TestCurrPam(
// search in all selections for this position // search in all selections for this position
SwShellCursor* pCmp = m_pCurrentCursor; // keep the pointer on cursor SwShellCursor* pCmp = m_pCurrentCursor; // keep the pointer on cursor
do { do
if( pCmp && pCmp->HasMark() &&
*pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos )
{ {
if (pCmp->HasMark() && *pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos)
return true; // return without update return true; // return without update
} pCmp = pCmp->GetNext();
} while( m_pCurrentCursor != ( pCmp = pCmp->GetNext() ) ); } while (m_pCurrentCursor != pCmp);
return false; return false;
} }
......
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