summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/chartarr.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 627068a5f731..40a6d91520a0 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -130,7 +130,7 @@ double getCellValue( ScDocument& rDoc, const ScAddress& rPos, double fDefault, b
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = rDoc.GetFormulaCell(rPos);
- if (!pFCell->GetErrCode() && pFCell->IsValue())
+ if (pFCell && !pFCell->GetErrCode() && pFCell->IsValue())
fRet = pFCell->GetValue();
}
break;