sw/source/core/layout/fly.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 42568a90c5cee26c2d08cc8513d8379f97e1310a Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Apr 25 09:50:10 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Apr 25 11:01:50 2025 +0200 sw: fix warning C6011: Dereferencing NULL pointer 'pUpper->Lower()' Change-Id: Ibb60f4109f6da3c8feb2d046b7f15c541e5f3b9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184604 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Tested-by: Jenkins diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 420745989cfa..4b8c953d8ac0 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -579,7 +579,8 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame &rMaster, SwFlyFrame &rFollow ) { // The Master sucks up the content of the Follow SwLayoutFrame *pUpper = &rMaster; - if ( pUpper->Lower()->IsColumnFrame() ) + SwFrame* pLower = pUpper->Lower(); + if ( pLower && pLower->IsColumnFrame() ) { pUpper = static_cast<SwLayoutFrame*>(pUpper->GetLastLower()); pUpper = static_cast<SwLayoutFrame*>(pUpper->Lower()); // The (Column)BodyFrame