summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Andre Laverdiere <marc-andre@atc.tcs.com>2011-07-25 14:07:58 +0530
committerMarc-Andre Laverdiere <marc-andre@atc.tcs.com>2011-07-29 11:15:18 +0530
commit6f32f7f8896dcb21e983adcb61ed400db7389a34 (patch)
treefed8d64799cb215f6cb47cd9b7e51176b3463ff9
parente63d5d1e183d7d2347484b811912201fb468367c (diff)
Fixed invalid pointer dereference
-rw-r--r--sw/source/core/layout/calcmove.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 04df070846..0b0b94a7fb 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -313,9 +313,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;