[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 2 08:50:16 UTC 2018
sw/source/core/table/swnewtable.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit e8b708b7707b4df997b3ec3c9b8a004b7dabb9ad
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 1 20:56:55 2018 +0000
forcepoint #13 null deref
Change-Id: I248316ff3a3df513b8b1d9a8f86ac48d4dc75bb0
Reviewed-on: https://gerrit.libreoffice.org/50603
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 571a3c62a2cf..e6a9a590187c 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -822,7 +822,10 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
// i.e. contiguous cells in contiguous rows
bool bMerge = false; // will be set if any content is transferred from
// a "not already overlapped" cell into the new master cell.
- SwTableBox *pMergeBox = pSel->maBoxes[0][0]; // the master cell box
+ const SwSelBoxes& rFirstBoxes = pSel->maBoxes[0];
+ if (rFirstBoxes.empty())
+ return false;
+ SwTableBox *pMergeBox = rFirstBoxes[0]; // the master cell box
if( !pMergeBox )
return false;
(*ppMergeBox) = pMergeBox;
More information about the Libreoffice-commits
mailing list