Fix(?) strange behaviour in angelcode clone
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2022-02-26 20:53:28 +01:00
parent fcc9988c3e
commit cf358c75a4
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,6 @@ AngelScriptScript::AngelScriptScript(const ArbUt::OptionalBorrowedPtr<void>& own
THROW("Script was created with owner value, but with unknown owner type.")
}
auto* handle = GetAngelscriptOwner();
handle->ReleaseReferences(resolver->GetEngine());
handle->Set(owner.GetValue(), ownerType);
}
}
@ -368,6 +367,7 @@ CreatureLib::Battling::BattleScript* AngelScriptScript::Clone(const ArbUt::Optio
auto* ctx = _ctxPool->RequestContext();
auto* obj = _type->Instantiate(ctx);
if (_obj != nullptr) {
obj->Release();
obj->CopyFrom(_obj);
}
_ctxPool->ReturnContextToPool(ctx);