diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-12-03 22:08:26 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-12-03 22:08:55 +0100 |
commit | ece13b024a34ffe46ee8d8fca4eadfec86bf2bf7 (patch) | |
tree | f5ef63622297f1e177b3aca6f3e88dbb2cf5bae0 /sw | |
parent | 6bce9b609e9811f5bb3a6168e8828663a25f5927 (diff) |
Related: fdo#57515 Crash when creating a Table of Contents
Change-Id: Idfdb62e495987a15bc5fc36548074ced7426e21c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index cbcdc529a966..a70b08d775d3 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -294,10 +294,13 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, // FIXME There are still cases were we don't have the proper node here. SwCntntFrm* pBackFrm = pBackNd->getLayoutFrm( getRootFrm( ) ); SwRect rBackRect; - pBackFrm->GetCharRect( rBackRect, aBackPos ); + if (pBackFrm) + { + pBackFrm->GetCharRect( rBackRect, aBackPos ); - nBackDistance = lcl_getDistance( rBackRect, rPoint ); - bValidBackDistance = true; + nBackDistance = lcl_getDistance( rBackRect, rPoint ); + bValidBackDistance = true; + } } if ( bValidTextDistance && bValidBackDistance && basegfx::fTools::more( nTextDistance, nBackDistance ) ) |