summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-26 10:31:17 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-26 12:23:18 +0100
commit7be3b5b8bac080a8762279531bbe758b3675cc38 (patch)
treee56849cd2d4c6515342906d4c9ff202dc0aa0100 /sc
parente805881d74392969746d34756b035850c67883e6 (diff)
coverity#1409898 Dereference before null check
Change-Id: I44b5ab0c66b4050c2ee47684af7526e2543945ca
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 78d4f37afa35..a83e13f33a7a 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1774,8 +1774,8 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos, ScTokenArr
mbRewind( false )
{
SetGrammar( ((eGrammar == formula::FormulaGrammar::GRAM_UNSPECIFIED) ?
- (pDocument ? pDocument->GetGrammar() : formula::FormulaGrammar::GRAM_DEFAULT) :
- eGrammar));
+ pDocument->GetGrammar() :
+ eGrammar) );
nMaxTab = pDoc->GetTableCount() - 1;
}