summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-15 10:42:33 +0100
committerAndras Timar <andras.timar@collabora.com>2018-08-21 10:53:41 +0200
commitd8ce5e308c3eb6e862ba4d29b52e3519bdc457ed (patch)
tree9dfd4ccb2e0bcb6c13ffcb4da3948f0a359628e6 /sc
parent1f6c57ccd0b3cf7d21877b0e29d5e3fc5f36d96c (diff)
tdf#115086 crash in assignLabelsToDataSequence
since... commit c45358e928b9b9419bba10a0fcb661696cb7647a Date: Mon Apr 24 00:09:08 2017 +0200 preserve "Total" label on round-trip, remove code duplication Change-Id: I83ed20e1cab8d67f2f5aedcaf862756d9548bf9f Reviewed-on: https://gerrit.libreoffice.org/59062 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit ff16f75a474533187253a190557d6e2195a7e4cb)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/PivotTableDataProvider.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index cfdea1bed39e..12f432a19085 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -617,7 +617,7 @@ PivotTableDataProvider::assignLabelsToDataSequence(size_t nIndex)
{
aLabel = ScGlobal::GetRscString(STR_PIVOT_TOTAL);
}
- else
+ else if (nIndex < m_aLabels.size())
{
for (ValueAndFormat const & rItem : m_aLabels[nIndex])
{