diff options
-rw-r--r-- | sw/source/core/layout/flycnt.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 65cf9b9b5655..038e97d5f7e2 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1241,8 +1241,16 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) while ( pCnt->IsFollow() ) { do - { pCnt = pCnt->GetPrevContentFrm(); - } while ( pCnt->GetFollow() != pFollow ); + { + SwContentFrm* pPrev = pCnt->GetPrevContentFrm(); + if (!pPrev) + { + SAL_WARN("sw.core", "very unexpected missing PrevContentFrm"); + break; + } + pCnt = pPrev; + } + while ( pCnt->GetFollow() != pFollow ); pFollow = pCnt; } SwTwips nDiff = 0; |