diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-23 15:02:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-23 15:11:01 +0000 |
commit | 05e7b1db351ee964d155e49c55de7db3c917083f (patch) | |
tree | fbb68e5cb96da94d54eaa17165fe7de49c5339d3 /chart2 | |
parent | 0442cd217645aa4fdd924e4c2e4f90a77f1fbbad (diff) |
Resolves: fdo#88229 Crash when you try to create a bar chart GL3D
Change-Id: I6390f8988ca287de19e9981053bdeb9473d1e3e1
Diffstat (limited to 'chart2')
-rwxr-xr-x | chart2/source/view/charttypes/GL3DBarChart.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
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<VDataSeries>& 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<VDataSeries>::const_iterator itr = rDataSeriesContainer.begin(), itrEnd = rDataSeriesContainer.end(); itr != itrEnd; ++itr) { |