sw/source/core/undo/unattr.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0326f812165619adae57af2d7d215e2486258438
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Aug 9 16:06:16 2025 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Wed Aug 13 09:37:11 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 <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 1d3efa2ada37940200f3eed298c9f859a592ae77)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189290
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 34219649a6de..47e127efa28d 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -385,7 +385,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

Reply via email to