Kaydet (Commit) 99cd15fa authored tarafından Luboš Luňák's avatar Luboš Luňák

avoid possible NULL dereference (fdo#82777)

Change-Id: Ifec915d5b2c9e5f7558e7850eb44e44300c9b374
üst a88b2d84
......@@ -2573,11 +2573,11 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pAnchoredObj);
const SwVirtFlyDrawObj* pObj = pFly->GetVirtDrawObj();
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
SwPosition anchoredAt = *pAnchoredObj->GetFrmFmt().GetAnchor().GetCntntAnchor();
bool inSelection = ( *pStartPos <= anchoredAt && anchoredAt < *pEndPos );
if( anchoredAt == *pEndPos )
const SwPosition* anchoredAt = pAnchoredObj->GetFrmFmt().GetAnchor().GetCntntAnchor();
bool inSelection = ( anchoredAt != NULL && *pStartPos <= *anchoredAt && *anchoredAt < *pEndPos );
if( anchoredAt != NULL && *anchoredAt == *pEndPos )
{
const SwNodes& nodes = anchoredAt.GetDoc()->GetNodes();
const SwNodes& nodes = anchoredAt->GetDoc()->GetNodes();
if( *pEndPos == SwPosition( nodes.GetEndOfContent()))
inSelection = true;
else
......
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