sw/source/core/undo/unattr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 8f84f585c3eb5ade04d7f8f29564300669c5e5b3 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Aug 9 16:06:16 2025 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Aug 11 12:07:01 2025 +0200 cid#1660804 Dereference null return value Change-Id: Ib53ec6473809dc99ada574827a378a0ab7b664d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189264 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins (cherry picked from commit 1d3efa2ada37940200f3eed298c9f859a592ae77) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189289 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 0fb796de9a2c..6059b68aac79 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -399,7 +399,7 @@ void SwUndoFormatAttr::SaveFlyAnchor( const SwFormat * pFormat, bool bSvDrwPt ) { // Format is valid, otherwise you would not reach this point here if( bSvDrwPt ) { - if ( RES_DRAWFRMFMT == pFormat->Which() ) { + if (pFormat && RES_DRAWFRMFMT == pFormat->Which()) { Point aPt( static_cast<const SwFrameFormat*>(pFormat)->FindSdrObject() ->GetRelativePos() ); // store old value as attribute, to keep SwUndoFormatAttr small