sw/source/core/docnode/node.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit d995cdd8f67a5015e71c5676e400c79a853a57a3 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue May 23 12:39:50 2023 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri May 26 13:34:09 2023 +0200 sw: fix crash in SwNode::GetFlyFormat() FindFlyFrame() might return nullptr See https://crashreport.libreoffice.org/stats/signature/SwNode::GetFlyFormat() Change-Id: Id99a806e62f03b8912747525c8b0235c1b23232b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152156 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit e518624da1bdad5fcb24feb41349efa4301329e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152210 diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index c50435e076fb..ced3b00c78eb 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -745,7 +745,7 @@ SwFrameFormat* SwNode::GetFlyFormat() const if( IsContentNode() ) { SwContentFrame* pFrame = SwIterator<SwContentFrame, SwContentNode, sw::IteratorMode::UnwrapMulti>(*static_cast<const SwContentNode*>(this)).First(); - if( pFrame ) + if( pFrame && pFrame->FindFlyFrame()) pRet = pFrame->FindFlyFrame()->GetFormat(); } if( !pRet )