diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index b36d65fe113c..903e4ec8c61b 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -311,7 +311,7 @@ const SwFrameFormat* SwFEShell::IsFlyInFly() SwFrameFormat *pFormat = FindFrameFormat( pObj ); if( pFormat && FLY_AT_FLY == pFormat->GetAnchor().GetAnchorId() ) { - const SwFrm* pFly = nullptr ? + const SwFrm* pFly = dynamic_cast(pObj) != nullptr ? static_cast(pObj)->GetFlyFrm()->GetAnchorFrm() : static_cast(GetUserCall(pObj))->GetAnchorFrm( pObj ); OSL_ENSURE( pFly, "IsFlyInFly: Where's my anchor?" ); @@ -394,7 +394,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) if ( FLY_AS_CHAR == nAnchorId ) return aRet; - bool bFlyFrame = nullptr; + bool bFlyFrame = dynamic_cast(pObj) != nullptr; SwFlyFrm* pFly = 0L; const SwFrm* pFooterOrHeader = NULL;