From 5bd46c2b38f89baa15f5dee55a29edb73fc51a7c Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 30 Jul 2015 20:22:02 +0200 Subject: [PATCH] Fix: ScriptFrame's 'Self' attribute gets corrupted when an expressions throws an exception fixes #9795 --- lib/config/expression.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }