From 59505b092604f8d3288e845662476e014f0b89a0 Mon Sep 17 00:00:00 2001 From: IhateTrains Date: Sat, 31 Aug 2024 15:23:14 +0100 Subject: [PATCH] Fix exception when christianity_religion is not found in CK3 (#2116) #patch Sentry event ID: b600839a66f24f06a6e837a16e27efb2 --- ImperatorToCK3/CK3/World.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImperatorToCK3/CK3/World.cs b/ImperatorToCK3/CK3/World.cs index dc689e885..cfc769b01 100644 --- a/ImperatorToCK3/CK3/World.cs +++ b/ImperatorToCK3/CK3/World.cs @@ -575,7 +575,7 @@ private void HandleIcelandAndFaroeIslands(Configuration config) { break; case < 874: faithCandidates = new OrderedSet { "insular_celtic", "catholic", "orthodox" }; - var christianFaiths = Religions["christianity_religion"].Faiths; + var christianFaiths = Religions.TryGetValue("christianity_religion", out var christianityReligion) ? christianityReligion.Faiths : []; // If there is at least one Irish Christian county, give it to the Irish Papar. // If there is at least one Christian county of another Gaelic culture, give it to a character of this Gaelic culture.