sw/source/core/frmedt/fecopy.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 58525e8692b6fc8c3fd1c601fa27853fb061d06b Author: Mike Kaganski <[email protected]> AuthorDate: Tue Feb 10 11:54:49 2026 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Feb 10 11:59:19 2026 +0100 enable-msvc-analyze: C6011: Dereferencing NULL pointer C:\lo Dereferencing NULL pointer 'pFormat'. .: Lines: 1394, 1395, 1396, 1398, 1403, 1405, 1406, 1408, 1411, 1412, 1416, 1421, 1423, 1424, 1425, 1427, 1430, 1432, 1434, 1435, 1436, 1453, 1454, 1455, 1456, 1457, 1459, 1460, 1461, 1463, 1464, 1466, 1468, 1469, 1473, 1476, 1477 C:\lo Dereferencing NULL pointer 'pAnchor'. .: Lines: 1394, 1395, 1396, 1398, 1403, 1405, 1406, 1408, 1411, 1412, 1416, 1421, 1423, 1424, 1425, 1427, 1430, 1432, 1434, 1435, 1436, 1453, 1454, 1455, 1456, 1457, 1459, 1460, 1461, 1463, 1464, 1466, 1468, 1469, 1473, 1476, 1477, 1479, 1480 C:\lo Dereferencing NULL pointer 'pTmp'. See line 1480 for an earlier location where this can occur.: Lines: 1394, 1395, 1396, 1398, 1403, 1405, 1406, 1408, 1411, 1412, 1416, 1421, 1423, 1424, 1425, 1427, 1430, 1432, 1434, 1435, 1436, 1453, 1454, 1455, 1456, 1457, 1459, 1460, 1461, 1463, 1464, 1466, 1468, 1469, 1473, 1476, 1477, 1479, 1480, 1482, 1484 Change-Id: I49faa8e2ddeb8c044e7a8bf74201dc147be11bc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199018 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 44853eb1bb3f..ae388e567ea2 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -1436,6 +1436,7 @@ SwPasteSdr SwFEShell::PasteStream(SvStream & rStrm, SwPasteSdr nAction, const Po if( DynCastSwVirtFlyDrawObj( pOldObj) != nullptr ) { pFormat = FindFrameFormat( pOldObj ); + assert(pFormat); Point aNullPt; SwFlyFrame* pFlyFrame = static_cast<const SwFlyFrameFormat*>(pFormat)->GetFrame( &aNullPt ); @@ -1472,6 +1473,9 @@ SwPasteSdr SwFEShell::PasteStream(SvStream & rStrm, SwPasteSdr nAction, const Po if( DynCastSwVirtFlyDrawObj( pOldObj) != nullptr ) { + assert(pFormat); + assert(pAnchor); + // store attributes, then set SdrObject SfxItemSetFixed<RES_SURROUND, RES_ANCHOR> aFrameSet( mxDoc->GetAttrPool() ); aFrameSet.Set( pFormat->GetAttrSet() );
