From ef3b6fa0cf3e4f2c7b29e9373a8afc8c2c7c7ca0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 22 Jan 2015 16:35:03 +0000 Subject: Related: fdo#87760 don't crash on searching for a place to put the anchor 1 press return in an empty writer doc a few times 2 insert a stock 2x2 table 4 enter A1 and change format->character to hidden A1 3 draw a rectangle above A1 so it'll get anchored to paragraph above table 5 draw rectangle anchor into A1 Change-Id: I2b0631908843150fae48f7e387a98e91cf90423d --- sw/source/core/frmedt/fefly1.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 4426640761ff..bdae991b66ea 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -430,7 +430,8 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) if ( nAnchorId != FLY_AT_CHAR || !PosInsideInputFld( aPos ) ) { - pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(), 0, &aPos, false ); + SwCntntNode* pCNode = aPos.nNode.GetNode().GetCntntNode(); + pTxtFrm = pCNode ? pCNode->getLayoutFrm(GetLayout(), 0, &aPos, false) : NULL; } } const SwFrm *pNewAnch = NULL; -- cgit