sc/source/core/data/PivotTableFormatOutput.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit c81fe7f7e4b416f818d7dfd8e141bccebce37a16 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Apr 20 21:25:27 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun Apr 21 14:51:28 2024 +0200 crashtesting: crash seen on import of forum-mso-en4-602306.xlsx Change-Id: Ib8bd453483c72382330b4c960cdbe735bdb97eac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166374 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/core/data/PivotTableFormatOutput.cxx b/sc/source/core/data/PivotTableFormatOutput.cxx index 575fd5e77508..83bf865573a4 100644 --- a/sc/source/core/data/PivotTableFormatOutput.cxx +++ b/sc/source/core/data/PivotTableFormatOutput.cxx @@ -98,7 +98,7 @@ void initFormatOutputField(size_t nSelectionIndex, std::vector<FormatOutputField { if (!rSelection.nIndices.empty() && rSelection.nField == rOutputField.nDimension) { - if (rSelection.nIndices.size() > 1) + if (rSelection.nIndices.size() > nSelectionIndex) rOutputField.nIndex = rSelection.nIndices[nSelectionIndex]; else rOutputField.nIndex = rSelection.nIndices[0];
