[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Aug 9 03:17:33 PDT 2011


 sw/source/core/layout/calcmove.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7db9cbb45b49b23dd63659a89cdd59d87b67a7cd
Author: Marc-Andre Laverdiere <marc-andre at atc.tcs.com>
Date:   Mon Jul 25 14:07:58 2011 +0530

    Fixed invalid pointer dereference
    (cherry picked from commit 6f32f7f8896dcb21e983adcb61ed400db7389a34)

diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 5e41bd8..b55947f 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -316,9 +316,9 @@ void SwFrm::PrepareMake()
         else if ( bCnt && sal_True == (bFoll = pThis->IsFollow()) &&
              GetPrev() )
         {
-            //Wenn der Master gereade ein CalcFollow ruft braucht die Kette
-            //nicht durchlaufen werden. Das spart Zeit und vermeidet Probleme.
-            if ( ((SwTxtFrm*)((SwTxtFrm*)this)->FindMaster())->IsLocked() )
+            //Do not follow the chain when we need only one instance
+            const SwTxtFrm* pMaster = ((SwCntntFrm*)this)->FindMaster();
+            if ( pMaster && pMaster->IsLocked() )
             {
                 MakeAll();
                 return;


More information about the Libreoffice-commits mailing list