summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-01-03 00:27:08 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-01-03 00:32:17 -0500
commitf204cd9b52ec7af3e0d20f5c88f09737b38b9e7d (patch)
treefab2d21649223787d00da617349248e7ffeac7d6
parenteee87edf551f7a9f8c4da4267e5710edafd1725d (diff)
fdo#58539: Check for mxValueLink being NULL before dereferencing.
Or else Calc would crash while loading the xls document from gnome519788. As an aside, this xls document appears to be corrupt. Trying to open it in Excel (XP and 2007) causes Excel to offer to repair it, while fails in both versions. Excel XP is somehow able to open it with some content preserved. No such luck with Excel 2007. Change-Id: I04616a4c926862461a2efdd99ccabe36122d6825
-rw-r--r--sc/source/filter/excel/xichart.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 1aa9d45a79d0..8310deb2f7dc 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -2057,7 +2057,7 @@ Reference< XDataSeries > XclImpChSeries::CreateDataSeries() const
aSeriesProp.SetBoolProperty( EXC_CHPROP_VARYCOLORSBY, rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE );
#endif
// #i91271# always set area formatting for every point in pie/doughnut charts
- if( mxSeriesFmt && ((bVarPointFmt && mxSeriesFmt->IsAutoArea()) || (rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE)) )
+ if (mxSeriesFmt && mxValueLink && ((bVarPointFmt && mxSeriesFmt->IsAutoArea()) || (rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE)))
{
for( sal_uInt16 nPointIdx = 0, nPointCount = mxValueLink->GetCellCount(); nPointIdx < nPointCount; ++nPointIdx )
{