diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-12-18 19:28:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-12-19 14:35:46 +0100 |
commit | 6ca94dbd576be7aaa643393e2a9e2ee1c723c357 (patch) | |
tree | b94269db2edbf61089bf11b6c35a6d8e9318e74e /sc | |
parent | 7620833fb4c48b9f981c81ea1ae72102c680f1a5 (diff) |
ofz#42605 Null-dereference
Change-Id: Ief752f20aa3e7672e4ed7f6cd1809ee56a096c43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127087
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index b8c8d79ffc89..42385b3441cf 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4380,7 +4380,8 @@ bool ScCompiler::NextNewToken( bool bInArray ) * handled by IsPredetectedReference(), this case here remains for * manual/API input. */ OUString aBad( aFormula.copy( nSrcPos-1 ) ); - eLastOp = pArr->AddBad( aBad )->GetOpCode(); + const FormulaToken* pBadToken = pArr->AddBad(aBad); + eLastOp = pBadToken ? pBadToken->GetOpCode() : ocNone; return false; } |