summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-03-12 22:42:15 +0100
committerMichael Stahl <mstahl@redhat.com>2012-03-12 23:18:09 +0100
commitb7c2124b39e8a93c8dadfaec5257e491da9fdda1 (patch)
tree846ce11527b2948572c00976c2e4fb300760e9ae /sw
parent8a10f9e3e9ecc2f2b626ce27c3a105dffbde5373 (diff)
SwFlowFrm::CalcUpperSpace: fix crash with null pPrevFrm in framework_unoapi
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/flowfrm.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index fe1ed540fe7b..1aacdbcefda0 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -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;
}