[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - chart2/source

Caolán McNamara caolanm at redhat.com
Sun Jan 25 02:20:48 PST 2015


 chart2/source/view/charttypes/GL3DBarChart.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 8eef38d87d5a876b9628355289ab6ddf9915db89
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 23 15:02:31 2015 +0000

    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 at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 7924e48..7d3159b 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)
     {


More information about the Libreoffice-commits mailing list