Fix Variant getters returning already freed managed handles

This commit is contained in:
2024-06-01 20:22:16 +03:00
parent e0791eacad
commit dedb3d57fd
8 changed files with 14 additions and 14 deletions

View File

@@ -212,7 +212,7 @@ bool BehaviorKnowledge::HasGoal(ScriptingTypeHandle type) const
return false;
}
Variant BehaviorKnowledge::GetGoal(ScriptingTypeHandle type)
const Variant& BehaviorKnowledge::GetGoal(ScriptingTypeHandle type) const
{
for (const Variant& goal : Goals)
{