[Libreoffice-commits] .: sw/source

Michael Stahl mst at kemper.freedesktop.org
Mon Mar 12 15:19:13 PDT 2012


 sw/source/core/layout/flowfrm.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b7c2124b39e8a93c8dadfaec5257e491da9fdda1
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Mar 12 22:42:15 2012 +0100

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

diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index fe1ed54..1aacdbc 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;
 }


More information about the Libreoffice-commits mailing list