sw/source/core/edit/edtab.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit 2c0930f19e269348a2aadc0ffe69ff23d04d7cc1 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Dec 11 09:03:51 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Dec 11 11:41:37 2020 +0100 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 <caol...@redhat.com> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits