summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-24 15:01:23 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-11-29 07:51:46 +0100
commit339a22a949245397931dc3aec6031a87c2a4402d (patch)
treefcf607ab6b9c13a1f161d3d674b8f0fc75755ef2
parent0bad71db742dcc7e2f8050214b2996495edb6a5b (diff)
ofz#10045 Null deref
Change-Id: If9c8edd94b02240510325d6c9c0fc7584ba89b5f Reviewed-on: https://gerrit.libreoffice.org/59574 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit fabac301a2c431a51bcae435e7ad87c843331877)
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 0015a90eb39a..d40153338725 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1030,8 +1030,11 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab
{
xStart = m_aTableRanges[0][0][0];
uno::Sequence< uno::Sequence< uno::Reference<text::XTextRange> > >& rLastRow = m_aTableRanges[m_aTableRanges.size() - 1];
- uno::Sequence< uno::Reference<text::XTextRange> >& rLastCell = rLastRow[rLastRow.getLength() - 1];
- xEnd = rLastCell[1];
+ if (rLastRow.getLength())
+ {
+ uno::Sequence< uno::Reference<text::XTextRange> >& rLastCell = rLastRow[rLastRow.getLength() - 1];
+ xEnd = rLastCell[1];
+ }
}
uno::Reference<text::XTextTable> xTable;
try