diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-12-18 19:28:00 +0000 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-12-21 11:11:07 +0100 |
commit | 95a01158e5021f2babc04a291523734a0a6d8f4d (patch) | |
tree | 1e15f0222c5d20bb92400ceee3f6cb54a618e00e /sc | |
parent | 66526bc24b884b361b06aea7529227b486423853 (diff) |
ofz#42605 Null-dereference
Change-Id: Ief752f20aa3e7672e4ed7f6cd1809ee56a096c43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127052
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
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 628465e0d085..cde3c16f4f4e 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4325,7 +4325,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; } |