[PATCH] don't crash for empty input data in charts, fdo#46885

Markus Mohrhard markus.mohrhard at googlemail.com
Sat Mar 3 15:05:33 PST 2012


Signed-off-by: Michael Meeks <michael.meeks at suse.com>
---
 sc/source/ui/unoobj/chart2uno.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 53b049b..93dcb56 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1565,7 +1565,7 @@ ScChart2DataProvider::createDataSource(
         }
         Reference< chart2::data::XLabeledDataSequence > xChartSeries = lcl_createLabeledDataSequenceFromTokens(
             pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
-        if ( xChartSeries.is() && xChartSeries->getValues()->getData().getLength() )
+        if ( xChartSeries.is() && xChartSeries->getValues().is() && xChartSeries->getValues()->getData().getLength() )
         {
             aSeqs.push_back( xChartSeries );
         }
-- 
1.7.3.4

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list