summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/drawingml/chart/plotareaconverter.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
index 24ab5f0bfd3e..af3139618824 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -415,7 +415,8 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel )
bool bSupportsVaryColorsByPoint = mrModel.maTypeGroups.size() == 1;
// convert all axes sets, and check which axis is attached to the first maTypeGroups
- sal_Int32 nStartAxesSetIdx = (rValAxisIds.size() > 1 && aAxesSets[0]->maAxes[1]->mnAxisId != rValAxisIds[0] ) ? 1 : 0;
+ sal_Int32 nStartAxesSetIdx = (rValAxisIds.size() > 1 && aAxesSets.size() > 0 && aAxesSets[0]->maAxes.count( API_Y_AXIS )
+ && aAxesSets[0]->maAxes[ API_Y_AXIS ]->mnAxisId != rValAxisIds[0] ) ? 1 : 0;
sal_Int32 nAxesSetIdx = nStartAxesSetIdx;
for (auto const& axesSet : aAxesSets)