sw/source/core/frmedt/fetab.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 11a9a7cf160e5b0e50fbecd8fe8f88fb455729a4
Author:     Mike Kaganski <[email protected]>
AuthorDate: Fri Oct 17 19:57:46 2025 +0200
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sun Oct 19 15:17:05 2025 +0200

    enable-msvc-analyze: C6011: Dereferencing NULL pointer
    
    C:\lo    Dereferencing NULL pointer 'this->GetDoc()->GetDocShell()'. : 
Lines:
    289, 290, 293, 300, 302
    
    Change-Id: I2a47ffa1fd2cb3578b1c3f180109d0a1d5287291
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192590
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 17a23562bb6e..45786fc5e81f 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -299,7 +299,9 @@ bool SwFEShell::DeleteCol()
 
     CurrShell aCurr( this );
 
-    bool bRecordChanges = GetDoc()->GetDocShell()->IsChangeRecording();
+    SwDocShell* pDocShell = GetDoc()->GetDocShell();
+    assert(pDocShell);
+    bool bRecordChanges = pDocShell->IsChangeRecording();
     bool bRecordAndHideChanges = bRecordChanges &&
         
GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->IsHideRedlines();
 
@@ -317,7 +319,7 @@ bool SwFEShell::DeleteCol()
         SwSelBoxes aBoxes;
         GetTableSel( *this, aBoxes, SwTableSearchType::Col );
 
-        TableWait aWait( 20, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() );
+        TableWait aWait( 20, pFrame, *pDocShell, aBoxes.size() );
 
         SwTableNode* pTableNd = pFrame->IsTextFrame()
             ? 
static_cast<SwTextFrame*>(pFrame)->GetTextNodeFirst()->FindTableNode()
@@ -386,7 +388,7 @@ bool SwFEShell::DeleteCol()
     GetTableSel(*this, aBoxes, eSearchType);
     if ( !aBoxes.empty() )
     {
-        TableWait aWait( aBoxes.size(), pFrame, *GetDoc()->GetDocShell() );
+        TableWait aWait( aBoxes.size(), pFrame, *pDocShell );
 
         // remove crsr from the deletion area.
         // Put them behind/on the table; via the

Reply via email to