summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Andre Laverdiere <marc-andre@atc.tcs.com>2011-07-25 14:07:58 +0530
committerCaolán McNamara <caolanm@redhat.com>2011-08-09 11:17:27 +0100
commit7db9cbb45b49b23dd63659a89cdd59d87b67a7cd (patch)
tree631c59f10c897d489685faab672aef595b2efac0
parent0772860756b7646391ade432e069032dd6d8d277 (diff)
Fixed invalid pointer dereference
(cherry picked from commit 6f32f7f8896dcb21e983adcb61ed400db7389a34)
-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 5e41bd891b..b55947f0bb 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;