From 7e6b950fee3a39fa57b3c698f76964a3297faff1 Mon Sep 17 00:00:00 2001 From: hzhang Date: Tue, 4 Mar 2025 11:58:14 +0000 Subject: [PATCH] add: Patchable items and frames --- src/Tasks/GenerateRegistryPassThrough.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Tasks/GenerateRegistryPassThrough.cs b/src/Tasks/GenerateRegistryPassThrough.cs index bb1f5fb..c1f0174 100644 --- a/src/Tasks/GenerateRegistryPassThrough.cs +++ b/src/Tasks/GenerateRegistryPassThrough.cs @@ -40,11 +40,13 @@ public class GenerateRegistryPassThrough : PoloniumTask .DescendantNodes() .OfType() .FirstOrDefault(cls => cls.Identifier.Text == "PoloniumRegistry"); - IEnumerable properties = clas!.Members + IEnumerable properties = clas?.Members .OfType() .Where(m => m.AttributeLists .SelectMany(a => a.Attributes) .Any(a => a.Name.ToString() == "RegistryPassThrough")); + if (properties is null) + return false; foreach (PropertyDeclarationSyntax property in properties) { if (HasGetterOnly(property))