diff --git a/DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs b/DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs index 9994b3b..8d0ae0a 100644 --- a/DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs +++ b/DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs @@ -63,7 +63,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) predicate: (syntaxNode, _) => syntaxNode is ClassDeclarationSyntax classDecl && classDecl.Modifiers.Any(x => x.IsKind(SyntaxKind.PartialKeyword)), transform: (generatorSyntaxContext, _) => GetSemanticTarget(generatorSyntaxContext)); - IncrementalValueProvider<(Compilation, ImmutableArray)> targets = context.CompilationProvider.Combine(apiRequestDerivedClasses.Collect()); + var targets = context.CompilationProvider.Combine(apiRequestDerivedClasses.Where(x => x != null).Collect()); context.RegisterSourceOutput(targets, (spc, source) => Execute(source.Item1, source.Item2, spc)); }