diff --git a/tpl/bhl_bind_macro.twig b/tpl/bhl_bind_macro.twig index cc26094..6708b7c 100644 --- a/tpl/bhl_bind_macro.twig +++ b/tpl/bhl_bind_macro.twig @@ -448,7 +448,8 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {%- macro val2native(type, value, native, is_arg = false) -%} {# any special case #} {%- if type == 'any' -%} - {{native}} = {{value}} + {{native}} = {{value}}; + {{native}}.Retain(); {%- else -%} {%~ if type is instanceof('\\mtgMetaFunc') -%}