Kaydet (Commit) 5e0b8b79 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#704994 Dereference after null check

Change-Id: I19f98152b5bd8c9b2cdfacb560d13fc0c1f8c4be
üst 9d6c648d
...@@ -207,11 +207,10 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId ...@@ -207,11 +207,10 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId
SwPaM* pNew = new SwPaM( aStt ); SwPaM* pNew = new SwPaM( aStt );
pNew->SetMark(); pNew->SetMark();
aStt = nEndIdx; aStt = nEndIdx;
if( 0 == (pCNode = aStt.GetNode().GetCntntNode()) && pCNode = aStt.GetNode().GetCntntNode();
0 == (pCNode = pNds->GoPrevious( &aStt )) ) if (!pCNode)
{ pCNode = pNds->GoPrevious(&aStt);
OSL_FAIL( "No more ContentNode at StartPos" ); assert(pCNode && "No more ContentNode at StartPos");
}
pCNode->MakeEndIndex( &pNew->GetPoint()->nContent ); pCNode->MakeEndIndex( &pNew->GetPoint()->nContent );
pNew->GetPoint()->nNode = aStt; pNew->GetPoint()->nNode = aStt;
return pNew; return pNew;
......
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