]> granicus.if.org Git - icinga2/commitdiff
Fix: ScriptFrame's 'Self' attribute gets corrupted when an expressions throws an...
authorGunnar Beutner <gunnar@beutner.name>
Thu, 30 Jul 2015 18:22:02 +0000 (20:22 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 30 Jul 2015 18:22:02 +0000 (20:22 +0200)
fixes #9795

lib/config/expression.cpp

index 03b2ceb61ded94db0cc4e591e54baf3e105e31e9..5b26aa2ba8a8344ed7f0beeb8e81c37f83cdee36 100644 (file)
@@ -460,7 +460,8 @@ ExpressionResult DictExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint
                        result = element.GetValue();
                }
        } catch (...) {
-               std::swap(self, frame.Self);
+               if (!m_Inline)
+                       std::swap(self, frame.Self);
                throw;
        }