Fix ExtractSpriteSequenceDocsCommand crash on non-generic static fields.

This commit is contained in:
Paul Chote
2023-01-22 18:44:08 +00:00
committed by Pavel Penev
parent 3ef0b3be95
commit 05c83a9dbb

View File

@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
.Select(y => y.Name)
.Where(y => y != type.Name && y != "Object"),
Properties = type.GetFields(BindingFlags.NonPublic | BindingFlags.Static)
.Where(fi => fi.FieldType.GetGenericTypeDefinition() == typeof(SpriteSequenceField<>))
.Where(fi => fi.FieldType.IsGenericType && fi.FieldType.GetGenericTypeDefinition() == typeof(SpriteSequenceField<>))
.Select(fi =>
{
var description = string.Join(" ", fi.GetCustomAttributes<DescAttribute>(false)