Hopefully fixes the issue with ref counting in angelscript
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-03-06 15:57:25 +01:00
parent e18767995c
commit 4a8b3e13a1
3 changed files with 2 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ CreatureLib::Battling::BattleScript* AngelScriptScript::Clone(const ArbUt::Optio
if (_obj != nullptr) {
obj->CopyFrom(_obj);
}
obj->AddRef();
_ctxPool->ReturnContextToPool(ctx);
return new AngelScriptScript(owner, GetAngelscriptOwner()->GetType(), _resolver, _type, obj, _ctxPool);