summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/PivotChartDataProvider.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/unoobj/PivotChartDataProvider.cxx')
-rw-r--r--sc/source/ui/unoobj/PivotChartDataProvider.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/PivotChartDataProvider.cxx b/sc/source/ui/unoobj/PivotChartDataProvider.cxx
index 954453193387..7fe660c4a77d 100644
--- a/sc/source/ui/unoobj/PivotChartDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotChartDataProvider.cxx
@@ -564,10 +564,12 @@ uno::Reference<chart2::data::XDataSource> PivotChartDataProvider::createPivotCha
{
std::vector<PivotChartItem> aFirstCategories;
- std::copy (m_aCategoriesColumnOrientation[0].begin(),
- m_aCategoriesColumnOrientation[0].end(),
- std::back_inserter(aFirstCategories));
-
+ if (!m_aCategoriesColumnOrientation.empty())
+ {
+ std::copy(m_aCategoriesColumnOrientation[0].begin(),
+ m_aCategoriesColumnOrientation[0].end(),
+ std::back_inserter(aFirstCategories));
+ }
uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence();
setLabeledDataSequenceValues(xResult, "categories", "Categories", aFirstCategories);
aLabeledSequences.push_back(xResult);