summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/export/chartexport.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 7de4cee0c4c0..c80e8c1ba688 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2959,7 +2959,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen
pFS->startElement(FSNS(XML_c, XML_numCache));
pFS->startElement(FSNS(XML_c, XML_formatCode));
OUString sNumberFormatString("General");
- const sal_Int32 nKey = xValueSeq->getNumberFormatKeyByIndex(-1);
+ const sal_Int32 nKey = xValueSeq.is() ? xValueSeq->getNumberFormatKeyByIndex(-1) : 0;
if (nKey > 0)
sNumberFormatString = getNumberFormatCode(nKey);
pFS->writeEscaped(sNumberFormatString);