diff --git a/OpenRA.Mods.Common/Scripting/Global/ActorGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/ActorGlobal.cs index 327b442a85..e72c7c408a 100644 --- a/OpenRA.Mods.Common/Scripting/Global/ActorGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/ActorGlobal.cs @@ -56,6 +56,10 @@ namespace OpenRA.Mods.Common.Scripting } } + var owner = initDict.GetOrDefault(); + if (owner == null) + throw new LuaException("Tried to create actor '{0}' with an invalid or no owner init!".F(type)); + // The actor must be added to the world at the end of the tick var a = Context.World.CreateActor(false, type, initDict); if (addToWorld)