Skip to content

Commit

Permalink
Merge pull request #31 from penev92/fixSequences
Browse files Browse the repository at this point in the history
Fixed code parsing throwing on invalid type cast
  • Loading branch information
penev92 authored Oct 24, 2022
2 parents f813e9e + 59cee84 commit 9b1f22e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/Oraide.Csharp/CodeParsers/RoslynCodeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static (ILookup<string, TraitInfo>,
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))
{
Expand Down

0 comments on commit 9b1f22e

Please sign in to comment.