From 94f4a9872cda3dcd46e2f48d2f55e78f70e88c7f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 9 Oct 2026 00:11:04 +0200 Subject: [PATCH] Roles backfill: separate the null and map checks (definite assignment survives mutation) Co-Authored-By: Claude Sonnet 5.5 --- tools/AetherDb/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/AetherDb/Program.cs b/tools/AetherDb/Program.cs index 170a3dfe9..22c50d456 100644 --- a/tools/AetherDb/Program.cs +++ b/tools/AetherDb/Program.cs @@ -1783,7 +1783,8 @@ public static class Program foreach (var field in behavior.GetType().GetFields().Where(f => f.FieldType == typeof(PerformanceStat))) { var stat = field.GetValue(behavior) as PerformanceStat; - if (stat == null || !map.TryGetValue(field.Name, out var role)) continue; + if (stat == null) continue; + if (!map.TryGetValue(field.Name, out var role)) continue; stat.Terms ??= new List(); var quality = stat.Terms.FirstOrDefault(t => t.Source == StatSource.Quality); var value = stat.Min;