From: Jérémie Astor <astor.jeremie@wanadoo.fr>
Date: Sat, 9 May 2020 19:24:05 +0000 (+0200)
Subject: :bug: Fix template match scoping
X-Git-Tag: nightly~1623
X-Git-Url: http://10.11.0.4:5575/?a=commitdiff_plain;h=1f3a539f0f3109c9519c4040cf9b4362d2391fc8;p=gwion.git

:bug: Fix template match scoping
---

diff --git a/src/parse/check.c b/src/parse/check.c
index 1d6131fb..39ad0f93 100644
--- a/src/parse/check.c
+++ b/src/parse/check.c
@@ -569,7 +569,7 @@ ANN static Func _find_template_match(const Env env, const Value v, const Exp_Cal
   }
   free_mstr(env->gwion->mp, tmpl_name);
   if(es.run)
-    envset_pop(&es, v->from->owner_class->e->owner_class);
+    envset_pop(&es, v->from->owner_class);
   env_pop(env, scope);
   env->func = former;
   return m_func;