sw/source/core/frmedt/fefly1.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 5d03464526cf4fbb8b6489124c7f7a1a7def4a9f Author: Caolán McNamara <[email protected]> AuthorDate: Tue Aug 16 11:54:48 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Aug 17 09:50:56 2022 +0200 cid#1500490 Dereference before null check Change-Id: I4e54da303b9e59e7f3db02af06e5156294e717fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138388 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index a63daab5e7ab..5f6389d56c60 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -476,7 +476,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) { auto pFlyFormat = dynamic_cast<const SwFlyFrameFormat*>(SwTextBoxHelper::getOtherTextBoxFormat( - &rFormat, RES_DRAWFRMFMT, pObj ? pObj : rFormat.FindRealSdrObject())); + &rFormat, RES_DRAWFRMFMT, pObj)); if (pFlyFormat) { pFly = pFlyFormat->GetFrame(); @@ -617,7 +617,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) } rFormat.GetDoc()->SetAttr( aAnch, rFormat ); if (SwTextBoxHelper::getOtherTextBoxFormat(&rFormat, RES_DRAWFRMFMT, - pObj ? pObj : rFormat.FindRealSdrObject())) + pObj)) { if (pObj->getChildrenOfSdrObject()) { @@ -628,8 +628,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) } else SwTextBoxHelper::syncFlyFrameAttr( - rFormat, rFormat.GetAttrSet(), - pObj ? pObj : rFormat.FindRealSdrObject()); + rFormat, rFormat.GetAttrSet(), pObj); } } // #i28701# - no call of method
