summaryrefslogtreecommitdiff
path: root/sc/source/core/tool
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool')
-rw-r--r--sc/source/core/tool/compiler.cxx3
-rw-r--r--sc/source/core/tool/interpr1.cxx6
2 files changed, 5 insertions, 4 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;
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 94923f75c255..cc710efc353e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1347,7 +1347,7 @@ void ScInterpreter::ScAnd()
}
break;
default:
- Pop();
+ PopError();
SetError( FormulaError::IllegalParameter);
}
}
@@ -1446,7 +1446,7 @@ void ScInterpreter::ScOr()
}
break;
default:
- Pop();
+ PopError();
SetError( FormulaError::IllegalParameter);
}
}
@@ -1548,7 +1548,7 @@ void ScInterpreter::ScXor()
}
break;
default:
- Pop();
+ PopError();
SetError( FormulaError::IllegalParameter);
}
}