From ee38b167c86c8f96aa41dca861cae327c6df5915 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 13 Feb 2012 12:26:50 -0500 Subject: [PATCH] fdo#45916: Ensure formula cell's pCode isn't NULL even when compilation fails. --- sc/source/core/data/cell.cxx | 3 +++ 1 file changed, 3 insertions(+) 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