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:31:53 -0500
commit329f3cd02546dfe58bf00f6ad3b71bc84a8d4320 (patch)
tree56e35b5cc1224cdf2943bdcb4b881acb3c8f733f
parent7a8a3e46978b3397ca8aba38917bd5dbc808c9b8 (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 )
{