From: Gunnar Beutner Date: Thu, 30 Jul 2015 18:22:02 +0000 (+0200) Subject: Fix: ScriptFrame's 'Self' attribute gets corrupted when an expressions throws an... X-Git-Tag: v2.4.0~460 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bd46c2b38f89baa15f5dee55a29edb73fc51a7c;p=icinga2 Fix: ScriptFrame's 'Self' attribute gets corrupted when an expressions throws an exception fixes #9795 --- diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp index 03b2ceb61..5b26aa2ba 100644 --- a/lib/config/expression.cpp +++ b/lib/config/expression.cpp @@ -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; }