summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-02-13 12:26:50 -0500
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-02-13 22:33:42 +0400
commitee38b167c86c8f96aa41dca861cae327c6df5915 (patch)
tree07a96c44bf9238aa1843e56d6fb49ceed913b351 /sc
parentd7baacd81bbcfaa35b7fbf9981fa3fa7c9fb1cb4 (diff)
fdo#45916: Ensure formula cell's pCode isn't NULL even when compilation fails.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/cell.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 2f3df26edcbf..b74f08e5bfe4 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -777,6 +777,9 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
aPos( rPos )
{
Compile( rFormula, true, eGrammar ); // bNoListening, Insert does that
+ if (!pCode)
+ // We need to have a non-NULL token array instance at all times.
+ pCode = new ScTokenArray;
}
// Wird von den Importfiltern verwendet