From 05e7b1db351ee964d155e49c55de7db3c917083f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 23 Jan 2015 15:02:31 +0000 Subject: Resolves: fdo#88229 Crash when you try to create a bar chart GL3D Change-Id: I6390f8988ca287de19e9981053bdeb9473d1e3e1 --- chart2/source/view/charttypes/GL3DBarChart.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'chart2') diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 407c34fac6b8..0701b8ca5627 100755 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -649,8 +649,15 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector& rDataSer sal_Int32 nSeriesIndex = 0; sal_Int32 nMaxPointCount = 0; double nMaxVal = findMaxValue(rDataSeriesContainer)/100; - const VDataSeries& rFirstRow = *(rDataSeriesContainer.begin()); - mnBarsInRow = rFirstRow.getTotalPointCount(); + if (rDataSeriesContainer.empty()) + { + mnBarsInRow = 0; + } + else + { + const VDataSeries& rFirstRow = *(rDataSeriesContainer.begin()); + mnBarsInRow = rFirstRow.getTotalPointCount(); + } for (boost::ptr_vector::const_iterator itr = rDataSeriesContainer.begin(), itrEnd = rDataSeriesContainer.end(); itr != itrEnd; ++itr) { -- cgit