SwFlowFrm::CalcUpperSpace: fix crash with null pPrevFrm in framework_unoapi

This commit is contained in:
Michael Stahl 2012-03-12 22:42:15 +01:00
parent 8a10f9e3e9
commit b7c2124b39

View file

@ -1626,8 +1626,11 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
bool bContextualSpacing = pAttrs->GetULSpace().GetContext();
delete pAccess;
if (bContextualSpacing && lcl_getContextualSpacing(pPrevFrm) && lcl_IdenticalStyles(pPrevFrm, &rThis))
if (bContextualSpacing && pPrevFrm && lcl_getContextualSpacing(pPrevFrm)
&& lcl_IdenticalStyles(pPrevFrm, &rThis))
{
return 0;
}
else
return nUpper;
}