We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a85e66 commit f7d83b8Copy full SHA for f7d83b8
Brio/Game/World/FestivalService.cs
@@ -26,8 +26,8 @@ public ReadOnlyCollection<FestivalEntry> ActiveFestivals
26
var active = _festivalInterop.GetActiveFestivals();
27
for(int idx = 0; idx < MaxFestivals; ++idx)
28
{
29
- var entry = _festivalEntries.First(i => i.Id == active[idx]);
30
- if(entry.Id != 0)
+ var entry = _festivalEntries.FirstOrDefault(i => i.Id == active[idx]);
+ if(entry != null && entry.Id != 0)
31
result.Add(entry);
32
}
33
return new(result);
0 commit comments