coverity#704900 Dereference after null check

Change-Id: I5ffac44f4fa48be0a4158c9eb234e94d2a22f5ed
This commit is contained in:
Caolán McNamara
2014-03-29 20:58:57 +00:00
parent b3530c2c3e
commit 1ee6577a0e

View File

@@ -1672,14 +1672,15 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell(
}
}
SwBorderAttrAccess* pAttrAccess = 0L;
if ( !_pAttrs || pFrm != &m_rThis )
SwBorderAttrAccess* pAttrAccess = NULL;
if (pFrm && (!_pAttrs || pFrm != &m_rThis))
{
pAttrAccess = new SwBorderAttrAccess( SwFrm::GetCache(), pFrm );
_pAttrs = pAttrAccess->Get();
}
nAdditionalLowerSpace += _pAttrs->GetULSpace().GetLower();
if (_pAttrs)
nAdditionalLowerSpace += _pAttrs->GetULSpace().GetLower();
delete pAttrAccess;
}