[Libreoffice-commits] .: 2 commits - sw/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sat Feb 19 08:33:52 PST 2011


 sw/source/core/doc/poolfmt.cxx   |    2 +-
 sw/source/core/layout/ftnfrm.cxx |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 36dc07a911622aa202a07d49b8f07c6654499a58
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Feb 19 17:33:21 2011 +0100

    Tiny cppcheck cleaning

diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index ad3243b..f699fe7 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2677,11 +2677,11 @@ void SwPageFrm::UpdateFtnNum()
                     else
                     {
                         SwFtnBossFrm* pTmpBoss = pFtn->FindFtnBossFrm( TRUE );
-                        SwPageFrm* pPage = pTmpBoss->FindPageFrm();
-                        pFtn = NULL;
-                        lcl_NextFtnBoss( pTmpBoss, pPage, FALSE );
                         if( pTmpBoss )
                         {
+                            SwPageFrm* pPage = pTmpBoss->FindPageFrm();
+                            pFtn = NULL;
+                            lcl_NextFtnBoss( pTmpBoss, pPage, FALSE );
                             SwFtnContFrm *pCont = pTmpBoss->FindNearestFtnCont();
                             if ( pCont )
                                 pFtn = (SwFtnFrm*)pCont->Lower();
commit 835bfb63e4b2d5c38f4cb1236da93bfbc689d179
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Feb 19 14:58:34 2011 +0100

    Null pointer dereference corrected

diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 21558dd..f7a8c59 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -298,7 +298,7 @@ void lcl_SetNumBul( SwDoc* pDoc, SwTxtFmtColl* pColl,
     rSet.Put( aLR );
     rSet.Put( aUL );
 
-    if( !pColl )
+    if( pColl )
         pColl->SetNextTxtFmtColl( *pDoc->GetTxtCollFromPool( nNxt ));
 }
 


More information about the Libreoffice-commits mailing list