diff -uNr sw.old/source/core/crsr/swcrsr.cxx sw.new/source/core/crsr/swcrsr.cxx --- sw.old/source/core/crsr/swcrsr.cxx 2007-07-16 15:38:26.000000000 +0800 +++ sw.new/source/core/crsr/swcrsr.cxx 2007-11-22 17:14:54.000000000 +0800 @@ -407,6 +407,13 @@ : pFrm->GetPrevCntntFrm() )) && 0 == pFrm->Frm().Height() ) ; + if( !pFrm )//maybe this "if" is ok for both in and ourside the loop below. + bGoNxt = !bGoNxt; + while ( !pFrm || pFrm && 0 == pFrm->Frm().Height() ) + { + pFrm = bGoNxt ? ((SwCntntNode*)pNd)->GetFrm()->GetNextCntntFrm() + : ((SwCntntNode*)pNd)->GetFrm()->GetPrevCntntFrm(); + } SwCntntNode* pCNd; if( pFrm && 0 != (pCNd = (SwCntntNode*)pFrm->GetNode()) )