diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-23 15:02:31 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-01-25 10:20:02 +0000 |
commit | 8eef38d87d5a876b9628355289ab6ddf9915db89 (patch) | |
tree | 7c67f08e6f9f26d0e442673c56d968c4dfb621d9 | |
parent | 62f66fabadc80c5466aeedb61b373cf1dd5e4133 (diff) |
Resolves: fdo#88229 Crash when you try to create a bar chart GL3D
Change-Id: I6390f8988ca287de19e9981053bdeb9473d1e3e1
(cherry picked from commit 05e7b1db351ee964d155e49c55de7db3c917083f)
Reviewed-on: https://gerrit.libreoffice.org/14138
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-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 7924e48c4306..7d3159ba6c3e 100755 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -650,8 +650,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) { |