[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 9 09:20:41 UTC 2021
sw/source/core/edit/edtab.cxx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 5ea8b62575eca6527310c9f51a418f3fae420e66
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Dec 11 09:03:51 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri Jul 9 11:20:08 2021 +0200
cid#1470585 Dereference null return value
Change-Id: If2a3eae843753a06d2f3fa9ac31acc9470cb6982
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107584
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 2c0930f19e269348a2aadc0ffe69ff23d04d7cc1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118616
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index b598e4754a70..03e951e2509c 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -148,17 +148,19 @@ bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTableOpts,
bool SwEditShell::TableToText( sal_Unicode cCh )
{
SwWait aWait( *GetDoc()->GetDocShell(), true );
- bool bRet = false;
SwPaM* pCursor = GetCursor();
const SwTableNode* pTableNd =
GetDoc()->IsIdxInTable( pCursor->GetPoint()->nNode );
+ if (!pTableNd)
+ return false;
+
if( IsTableMode() )
{
ClearMark();
pCursor = GetCursor();
}
- else if( !pTableNd || pCursor->GetNext() != pCursor )
- return bRet;
+ else if (pCursor->GetNext() != pCursor)
+ return false;
// TL_CHART2:
// tell the charts about the table to be deleted and have them use their own data
@@ -177,7 +179,7 @@ bool SwEditShell::TableToText( sal_Unicode cCh )
//Modified for bug #i119954# Application crashed if undo/redo convert nest table to text
StartUndo();
- bRet = ConvertTableToText( pTableNd, cCh );
+ bool bRet = ConvertTableToText( pTableNd, cCh );
EndUndo();
//End for bug #i119954#
pCursor->GetPoint()->nNode = aTabIdx;
More information about the Libreoffice-commits
mailing list