summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/interpr1.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 345ab7115815..44672395903f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -187,7 +187,13 @@ void ScInterpreter::ScIfJump()
break;
default:
{
- if ( GetBool() )
+ const bool bCondition = GetBool();
+ if (nGlobalError != FormulaError::NONE)
+ { // Propagate error, not THEN- or ELSE-path, jump behind.
+ PushError(nGlobalError);
+ aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
+ }
+ else if ( bCondition )
{ // TRUE
if( nJumpCount >= 2 )
{ // THEN path