diff --git a/OpenRA.Game/Exts.cs b/OpenRA.Game/Exts.cs index 27d9d18d21..3d4af5be77 100644 --- a/OpenRA.Game/Exts.cs +++ b/OpenRA.Game/Exts.cs @@ -53,7 +53,7 @@ namespace OpenRA public static bool HasAttribute(this MemberInfo mi) { - return mi.GetCustomAttributes(typeof(T), true).Length != 0; + return Attribute.IsDefined(mi, typeof(T)); } public static T[] GetCustomAttributes(this MemberInfo mi, bool inherit)