[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source
Caolán McNamara
caolanm at redhat.com
Fri May 2 23:41:29 PDT 2014
sw/source/core/frmedt/fefly1.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 8ff260e47873674ca03a334f6b3198d66dc68db7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 29 12:58:56 2014 +0100
fix crash found when exploring fdo#50697
(cherry picked from commit b25871da62facc20387ebfa2b908422578ca8ce9)
Conflicts:
sw/source/core/frmedt/fefly1.cxx
Change-Id: Ie781c2534cb41104dd3d91d4370639e98baa8112
Reviewed-on: https://gerrit.libreoffice.org/9202
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 1931c73..025c752 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -342,10 +342,11 @@ const SwFrmFmt* SwFEShell::IsFlyInFly()
aPoint.setX(aPoint.getX() - 1); //do not land in the fly!!
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
// determine text frame by left-top-corner of object
- pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(), &aTmpPos, 0, sal_False );
+ SwCntntNode *pNd = aPos.nNode.GetNode().GetCntntNode();
+ pTxtFrm = pNd ? pNd->getLayoutFrm(GetLayout(), &aTmpPos, 0, sal_False) : NULL;
}
- const SwFrm *pTmp = ::FindAnchor( pTxtFrm, aTmpPos );
- const SwFlyFrm *pFly = pTmp->FindFlyFrm();
+ const SwFrm *pTmp = pTxtFrm ? ::FindAnchor(pTxtFrm, aTmpPos) : NULL;
+ const SwFlyFrm *pFly = pTmp ? pTmp->FindFlyFrm() : NULL;
if( pFly )
return pFly->GetFmt();
return NULL;
More information about the Libreoffice-commits
mailing list