diff --git a/OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs index 411dc92e87..41fb991f9c 100644 --- a/OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs +++ b/OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs @@ -60,6 +60,9 @@ namespace OpenRA.Mods.Common.Scripting set { + if (value == null) + throw new LuaException("Attempted to change the owner of actor '{0}' to nil value.".F(Self)); + if (Self.Owner != value) Self.ChangeOwner(value); }