summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-01 20:56:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-02 09:49:47 +0100
commite8b708b7707b4df997b3ec3c9b8a004b7dabb9ad (patch)
treedd9e0e46c812287c67bfe34f9e5f311d0ff25606 /sw
parent3d39c2a84f05e4b6dcdccc7e5380a98c147ee704 (diff)
forcepoint #13 null deref
Change-Id: I248316ff3a3df513b8b1d9a8f86ac48d4dc75bb0 Reviewed-on: https://gerrit.libreoffice.org/50603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/table/swnewtable.cxx5
1 files changed, 4 insertions, 1 deletions
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;