diff --git a/server/Oraide.Csharp/CodeParsers/RoslynCodeParser.cs b/server/Oraide.Csharp/CodeParsers/RoslynCodeParser.cs index 034aff2..44ca873 100644 --- a/server/Oraide.Csharp/CodeParsers/RoslynCodeParser.cs +++ b/server/Oraide.Csharp/CodeParsers/RoslynCodeParser.cs @@ -81,7 +81,7 @@ public static (ILookup, if (member is FieldDeclarationSyntax fieldMember && fieldMember.Modifiers.Any(x => x.ValueText == "static") && fieldMember.Modifiers.Any(x => x.ValueText == "readonly") - && (fieldMember.Declaration.Type as GenericNameSyntax).Identifier.ValueText == "SpriteSequenceField") + && (fieldMember.Declaration.Type as GenericNameSyntax)?.Identifier.ValueText == "SpriteSequenceField") { foreach (var fieldInfo in ParseClassField(filePath, fileText, fieldMember)) {