diff --git a/OpenRA.Game/Scripting/ScriptTypes.cs b/OpenRA.Game/Scripting/ScriptTypes.cs index dd5ec8fe20..14a792b7f6 100644 --- a/OpenRA.Game/Scripting/ScriptTypes.cs +++ b/OpenRA.Game/Scripting/ScriptTypes.cs @@ -37,6 +37,12 @@ namespace OpenRA.Scripting { object temp; + // Is t a nullable? + // If yes, get the underlying type + var nullable = Nullable.GetUnderlyingType(t); + if (nullable != null) + t = nullable; + // Value wraps a CLR object if (value.TryGetClrObject(out temp)) {